国产91亚洲精品,色先锋资源久久综合5566,91久久青草http://www.aygfsteel.com/paulwong/category/50517.htmlzh-cnFri, 23 Aug 2019 12:40:37 GMTFri, 23 Aug 2019 12:40:37 GMT60消息傳遞平臺 JBoss A-MQhttp://www.aygfsteel.com/paulwong/archive/2015/04/07/424199.htmlpaulwongpaulwongTue, 07 Apr 2015 13:44:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/04/07/424199.htmlhttp://www.aygfsteel.com/paulwong/comments/424199.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/04/07/424199.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/424199.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/424199.htmlJBoss A-MQ 是高性能,靈活的信息平臺,可以安全的傳遞消息,非常可靠,而且支持 Internet of Things (IoT)。JBoss A-MQ 在任意的配置中都可以很容易部署和管理,可以在保證基礎(chǔ)設(shè)施的基礎(chǔ)上部署,也可以在云端部署,或者是混合配置下部署。

JBoss A-MQ 支持多種語言:C,C++ 和 Java;同時(shí)還支持多種協(xié)議:JMS 1.1, TCP, SSL, STOMP, NMS, MQTT, AMQP 1.0。

JBoss A-MQ 擴(kuò)展了 xPaaS 消息功能,提供 OpenShift Platform-as-a-Service (PaaS) 解決方案。



paulwong 2015-04-07 21:44 發(fā)表評論
]]>
JBoss 集成管理平臺 Embedded Joprhttp://www.aygfsteel.com/paulwong/archive/2015/04/07/424197.htmlpaulwongpaulwongTue, 07 Apr 2015 13:42:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/04/07/424197.htmlhttp://www.aygfsteel.com/paulwong/comments/424197.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/04/07/424197.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/424197.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/424197.htmlEmbedded Jopr 是基于 Web 的應(yīng)用,可以管理和監(jiān)控 JBoss Application Server 的實(shí)例。 

Embedded Jopr 是 Jopr 的分支,復(fù)用了大量 Jopr 的組件。Embedded Jopr 的最終目標(biāo)是替代 jmx 和 web 工作臺。可以作為配置和監(jiān)控 JBoss AS 實(shí)例的工具。

示例視頻: demo video



paulwong 2015-04-07 21:42 發(fā)表評論
]]>
NETTY資源http://www.aygfsteel.com/paulwong/archive/2015/02/26/423039.htmlpaulwongpaulwongThu, 26 Feb 2015 01:49:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/02/26/423039.htmlhttp://www.aygfsteel.com/paulwong/comments/423039.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/02/26/423039.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/423039.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/423039.htmlNetty4.0學(xué)習(xí)筆記系列之一:Server與Client的通訊

Netty4.0學(xué)習(xí)筆記系列之二:Handler的執(zhí)行順序


Netty4.0學(xué)習(xí)筆記系列之三:構(gòu)建簡單的http服務(wù)


Netty4.0學(xué)習(xí)筆記系列之四:混合使用coder和handler


Netty4.0學(xué)習(xí)筆記系列之五:自定義通訊協(xié)議

Netty4.0學(xué)習(xí)筆記系列之六:多種通訊協(xié)議支持


NETTY HTTP JAX-RS服務(wù)器
https://github.com/continuuity/netty-http

netty和tomcat的hello world性能比較
http://my.oschina.net/u/2302546/blog/368685

nginx+tomcat與netty優(yōu)缺點(diǎn)


NETTY官方EXAMPLE
https://github.com/netty/netty/tree/4.0/example/src/main/java/io/netty/example




paulwong 2015-02-26 09:49 發(fā)表評論
]]>
使用WILDFLY中的分布式緩存INFISHPANhttp://www.aygfsteel.com/paulwong/archive/2015/02/23/422998.htmlpaulwongpaulwongMon, 23 Feb 2015 05:40:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/02/23/422998.htmlhttp://www.aygfsteel.com/paulwong/comments/422998.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/02/23/422998.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/422998.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/422998.html
  • 通過http://127.0.0.1:9991/console/App.html#infinispan添加CACHE
    <cache-container name="tickets" default-cache="default" jndi-name="java:jboss/infinispan/tickets">
           <local-cache name="default" batching="true">
                  <locking isolation="REPEATABLE_READ"/>
           </local-cache>
    </cache-container>

  • pom.xml添加依賴包
            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-core</artifactId>
                <scope>provided</scope>
            </dependency>
            
            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-client-hotrod</artifactId>
                <scope>provided</scope>
            </dependency>

        <dependency>
            <groupId>org.jgroups</groupId>
            <artifactId>jgroups</artifactId>
            <scope>provided</scope>
        </dependency>

            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-spring</artifactId>
                <version>6.0.2.Final</version>
            </dependency>
            
            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-jcache</artifactId>
                <version>6.0.2.Final</version>
            </dependency>

  • 添加攔截器,WEB-INF/beans.xml
    <?xml version="1.0"?>
    <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation
    ="http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd">
        <interceptors>
            <class>org.infinispan.jcache.annotation.CacheResultInterceptor</class>
            <class>org.infinispan.jcache.annotation.CachePutInterceptor</class>
            <class>org.infinispan.jcache.annotation.CacheRemoveEntryInterceptor</class>
            <class>org.infinispan.jcache.annotation.CacheRemoveAllInterceptor</class>
        </interceptors>
    </beans>

  • 添加項(xiàng)目的全局依賴,WEB-INF/jboss-deployment-structure.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-deployment-structure>
        <deployment>
            <dependencies>
                <module name="org.jboss.xnio" />
                <module name="org.infinispan" export="true"/>
                <module name="org.infinispan.commons" export="true"/>
                <module name="org.infinispan.client.hotrod" export="true"/>
            </dependencies>
        </deployment>
    </jboss-deployment-structure>

  • 在CDI BEAN中使用CACHE
    package com.paul.myejb;

    import javax.annotation.Resource;
    import javax.cache.annotation.CacheResult;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import javax.interceptor.Interceptors;

    import org.infinispan.Cache;
    import org.infinispan.manager.EmbeddedCacheManager;
    //import org.springframework.cache.annotation.Cacheable;
    import org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor;

    /**
     * Session Bean implementation class HelloWorldBean
     
    */
    @Stateless
    //@Local(HelloWorld.class)
    @Remote(HelloWorld.class)
    @Interceptors(SpringBeanAutowiringInterceptor.class)
    //@RolesAllowed({Roles.ADMIN})
    public class HelloWorldBean implements HelloWorld {
        
        @Resource(lookup = "java:jboss/infinispan/tickets")
        private EmbeddedCacheManager container;
        
        
        /**
         * Default constructor. 
         
    */
        public HelloWorldBean() {
        }

    //    @Transactional
    //    @Cacheable(value = "books", key = "#name")
        @CacheResult
        public String sayHello(String name) {
            System.out.println("NO CACHE");
            String result = "Hello " + name + ", I am HelloWorldBean.";
            Cache<String, String> cache = this.container.getCache();
            cache.put(name, result);
            return result;
        }

    }


  • 修改modules/system/layers/base/org/infinispan/client/hotrod/main/modules.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
      ~ JBoss, Home of Professional Open Source.
      ~ Copyright 2010, Red Hat, Inc., and individual contributors
      ~ as indicated by the @author tags. See the copyright.txt file in the
      ~ distribution for a full listing of individual contributors.
      ~
      ~ This is free software; you can redistribute it and/or modify it
      ~ under the terms of the GNU Lesser General Public License as
      ~ published by the Free Software Foundation; either version 2.1 of
      ~ the License, or (at your option) any later version.
      ~
      ~ This software is distributed in the hope that it will be useful,
      ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
      ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
      ~ Lesser General Public License for more details.
      ~
      ~ You should have received a copy of the GNU Lesser General Public
      ~ License along with this software; if not, write to the Free
      ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
      ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
      
    -->
    <module xmlns="urn:jboss:module:1.3" name="org.infinispan.client.hotrod">
        <properties>
            <property name="jboss.api" value="private"/>
        </properties>

        <resources>
            <resource-root path="infinispan-client-hotrod-6.0.2.Final.jar"/>
        </resources>

        <dependencies>
            <module name="javax.api"/>
            <!--下面這一行注釋掉-->
            <!--<module name="com.google.protobuf"/>-->
            <module name="org.apache.commons.pool"/>
            <module name="org.infinispan.commons"/>
            <module name="org.infinispan.query.dsl"/>
            <module name="org.jboss.logging"/>
        </dependencies>
    </module>

  • 以下是SPRING版本
    1. 添加依賴的SPRING BEAN
      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
          xmlns:xsi
      ="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
          xmlns:cache
      ="http://www.springframework.org/schema/cache"
          xmlns:p
      ="http://www.springframework.org/schema/p"
          xmlns:jee
      ="http://www.springframework.org/schema/jee"
          xsi:schemaLocation
      ="http://www.springframework.org/schema/context
                http://www.springframework.org/schema/context/spring-context-3.0.xsd
                http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                http://www.springframework.org/schema/cache
                http://www.springframework.org/schema/cache/spring-cache.xsd
                http://www.springframework.org/schema/jee 
                http://www.springframework.org/schema/jee/spring-jee.xsd"
      >

          <cache:annotation-driven />
          
          <bean id="cacheManager"
                class
      ="org.infinispan.spring.provider.ContainerCacheManagerFactoryBean">
                <constructor-arg ref="cacheContainer"  />
          </bean>
          
          <jee:jndi-lookup id="cacheContainer" jndi-name="java:jboss/infinispan/tickets" > 
          </jee:jndi-lookup>
          
          <!-- <bean id="cacheContainer"
                class="com.paul.myejb.common.util.cache.JndiSpringCacheManagerFactoryBean"
                p:infinispanJNDI="java:jboss/infinispan/tickets" /> 
      -->
          
      </beans>

    2. 使用CACHE
      package com.paul.myejb.spring;

      import org.springframework.beans.factory.annotation.Autowired;
      import org.springframework.cache.CacheManager;
      import org.springframework.cache.annotation.Cacheable;
      import org.springframework.stereotype.Component;

      @Component
      public class MySpringBean {
          
          @Autowired
          private CacheManager cacheManager;
          
          @Cacheable(value = "my-local-cache", key = "#name")
          public String sayHello(String name)
          {
              System.out.println("MySpringBean NO CACHE");
              String result = "Hi " + name + ", I am Spring!";
              org.springframework.cache.Cache springCache = this.cacheManager.getCache("my-local-cache");
              System.out.println(springCache.get(name) == null ? "null" : springCache.get(name).get());
              springCache.put(name, result);
              return result;
          }

      }




    paulwong 2015-02-23 13:40 發(fā)表評論
    ]]>
    Infinispan資源http://www.aygfsteel.com/paulwong/archive/2015/02/22/422993.htmlpaulwongpaulwongSun, 22 Feb 2015 06:03:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/02/22/422993.htmlhttp://www.aygfsteel.com/paulwong/comments/422993.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/02/22/422993.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/422993.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/422993.html 使用時(shí)最好與SPRING結(jié)合,用在DAO層。
    以某方法參數(shù)作為KEY,返回的對象作為VALUE保存到緩存中。
    ADD/EDIT/REMOVE方法被執(zhí)行時(shí)則清除所有的緩存。

    Infinispan的運(yùn)行模式有兩種:
    1、嵌入式
    先啟動一個進(jìn)程,再在此進(jìn)程中啟動Infinispan的CACHE MANAGER。
    2、CLIENT/SERVER
    直接運(yùn)行startserver.sh來啟動。

    兩者區(qū)別
    嵌入式:
    1、Infinispan和啟動進(jìn)程是在同一個進(jìn)程里,如JBOSS中的Infinispan
    2、要使用Infinispan的CACHE,必須將應(yīng)用部署到此進(jìn)程中,如將WAR應(yīng)用部署到JBOSS中
    3、如有多臺機(jī)以此模式運(yùn)行,則互相可以通訊

    CLIENT/SERVER:
    1、Infinispan單獨(dú)一個進(jìn)程
    2、通過SDK,以MEMCHAED,RHQ等協(xié)議訪問CACHE
    3、如有多臺機(jī)以此模式運(yùn)行,互相不可以通訊

    JBOSS中的INFINISPAN肯定是嵌入式,要訪問INFINISPAN的CACHE必須部署到JBOSS才能訪問,沒有遠(yuǎn)程模式。

    Infinispan中的CACHE有兩種模式:本地緩存和集群緩存。

    本地緩存是單機(jī)版。
    集群緩存是多機(jī)網(wǎng)絡(luò)版,又分為三種:
    1、分布式:網(wǎng)絡(luò)中的每個節(jié)點(diǎn)只保存部份緩存條目,所有的節(jié)點(diǎn)合起來保存全部緩存條目
    當(dāng)本機(jī)無此條目時(shí),要通過網(wǎng)絡(luò)去到別的機(jī)器上取
    2、復(fù)制式:網(wǎng)絡(luò)中的每個節(jié)點(diǎn)都保存全部緩存條目,但緩存條目有更新時(shí),所有節(jié)點(diǎn)一并更新
    當(dāng)本機(jī)無此條目時(shí),不用到別的節(jié)點(diǎn)取,但緩存條目有更新時(shí),所有節(jié)點(diǎn)都會執(zhí)行更新本地緩存操作
    3、無效式:網(wǎng)絡(luò)中的每個節(jié)點(diǎn)互不通訊,但緩存條目有更新時(shí),節(jié)點(diǎn)收到失效通知,各自處理本機(jī)的緩存條目

    編程使用方法
    1、通過程序使用,即在代碼中寫cache的存取。
    2、通過注釋使用,這各注釋是通過截面攔截方法方式實(shí)現(xiàn),即如果在緩存中有此緩存條目,則方法不會被執(zhí)行,直接返回結(jié)果。
    又細(xì)分兩種:
    通過SPRING實(shí)現(xiàn),通過JAVA EE的CDI實(shí)現(xiàn)。

    JBoss 系列三十一:JBoss Data Grid(Infinispan)緩存模式

    JBoss 系列三十二:JBoss Data Grid(Infinispan)緩存模式示例


    infinispan-quickstart


    https://docs.jboss.org/infinispan/5.0/apidocs/org/infinispan/spring/provider/package-summary.html


    Infinispan integrate with spring based application
    http://timtang.me/blog/2012/11/04/infinispan-spring-based-application-integration/


    Java緩存新標(biāo)準(zhǔn)(javax.cache)
    http://www.importnew.com/11723.html

    https://developer.jboss.org/en/infinispan/cn/content?filterID=contentstatus[published]~objecttype~objecttype[document]

    paulwong 2015-02-22 14:03 發(fā)表評論
    ]]>
    Add Apache Camel and Spring as jboss modules in WildFlyhttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422988.htmlpaulwongpaulwongSat, 21 Feb 2015 12:13:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422988.htmlhttp://www.aygfsteel.com/paulwong/comments/422988.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422988.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/422988.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/422988.html閱讀全文

    paulwong 2015-02-21 20:13 發(fā)表評論
    ]]>
    JBoss AS7的classloader機(jī)制http://www.aygfsteel.com/paulwong/archive/2015/02/21/422987.htmlpaulwongpaulwongSat, 21 Feb 2015 11:35:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422987.htmlhttp://www.aygfsteel.com/paulwong/comments/422987.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422987.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/422987.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/422987.html閱讀全文

    paulwong 2015-02-21 19:35 發(fā)表評論
    ]]>
    Undertow新一代JBOSS WEB服務(wù)器http://www.aygfsteel.com/paulwong/archive/2015/02/21/422986.htmlpaulwongpaulwongSat, 21 Feb 2015 09:45:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422986.htmlhttp://www.aygfsteel.com/paulwong/comments/422986.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422986.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/422986.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/422986.htmlUndertow服務(wù)器基礎(chǔ)分析 - 概述

    Undertow服務(wù)器基礎(chǔ)分析 - XNIO



    Undertow服務(wù)器基礎(chǔ)分析 - Undertow







    paulwong 2015-02-21 17:45 發(fā)表評論
    ]]>
    JBOSS編程資源http://www.aygfsteel.com/paulwong/archive/2015/02/21/422985.htmlpaulwongpaulwongSat, 21 Feb 2015 07:58:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422985.htmlhttp://www.aygfsteel.com/paulwong/comments/422985.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/02/21/422985.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/422985.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/422985.htmlJBOSS系列 -EJB遠(yuǎn)程調(diào)用-客戶端的配置


    JBOSS系列 -EJB遠(yuǎn)程調(diào)用-JBOSS的配置


    JBOSS系列 -熱部署


    JBOSS系列--集群--基礎(chǔ)配置(1)--客戶端


    JBOSS系列--集群--基礎(chǔ)配置(2)--服務(wù)端


    JBOSS系列--負(fù)載均衡




    paulwong 2015-02-21 15:58 發(fā)表評論
    ]]>
    WildFly讀書筆記http://www.aygfsteel.com/paulwong/archive/2015/02/14/422929.htmlpaulwongpaulwongSat, 14 Feb 2015 09:09:00 GMThttp://www.aygfsteel.com/paulwong/archive/2015/02/14/422929.htmlhttp://www.aygfsteel.com/paulwong/comments/422929.htmlhttp://www.aygfsteel.com/paulwong/archive/2015/02/14/422929.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/422929.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/422929.html
  • 下載安裝
    http://wildfly.org/downloads/下載WildFly is 8.1.0.Final
  • 啟動、關(guān)閉
    在/bin中運(yùn)行:./standalone.sh 
    如果想改內(nèi)存大小,則在standalone.conf 中可以配置
    在/bin中運(yùn)行:jboss-cli.sh 
    [disconnected /] connect
    Connected to localhost:9990
    [standalone@localhost:9990 /] :shutdown

    ./jboss-cli.sh --connect command=:shutdown

    [disconnected /] connect 192.168.1.10
    Authenticating against security realm: ManagementRealm
    Username: admin1234
    Password:
    Connected to 192.168.1.10:9990
    [standalone@192.168.1.10:9990 / ] :shutdown


    [disconnected /] connect 

    Connected to localhost:9990 

    [standalone@localhost:9990 /] :reload 

  • 安裝ECLIPSE插件
    Help | Install New Software
    http://download.jboss.org/jbosstools/
    updates/development/luna

  • 關(guān)鍵概念
    Domain Controller
    分發(fā)配置文件

    Host Controller
    分發(fā)部署文件

    Application server nodes
    不同的節(jié)點(diǎn)可以配置不同的組

  • WildFly目錄結(jié)構(gòu)
    bin
    腳本

    modules
    J2EE核心功能

    standalone
    獨(dú)立運(yùn)行模式的相關(guān)配置

    domain
    分布式運(yùn)行模式的想著配置

  • 管理WildFly
    有三種模式:WEB UI、COMMAND LINE、XML配置文件(standalone.xml/domain.xml )

  • 在SPRING環(huán)境中如何存取遠(yuǎn)程EJB3
    使用jee:jndi-lookup查找
    加上org.jboss.ejb.client.scoped.context=true

  • CLASS LOADING
    原理:
    http://www.aygfsteel.com/paulwong/archive/2015/02/21/422987.html

    每個MODULE都有獨(dú)立的CLASS LOADER
    WAR/EAR/EJB都是一個MODULE,但是動態(tài)的,如果有依賴SPRING,又不想打進(jìn)EAR/WAR包中,要先新加modlue.xml,再在META-INF/WEB-INF中加入文件:jboss-deployment-structure.xml,此文件是用來定義EAR中的WAR/EJB的類依賴
    完整的解釋在:https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly
    <?xml version="1.0" encoding="UTF-8"?>
    <jboss-deployment-structure>
        <deployment>
            <dependencies>
                <module name="org.jboss.xnio" />
            </dependencies>
        </deployment>
    </jboss-deployment-structure>
    詳見此編
    http://www.aygfsteel.com/paulwong/archive/2015/02/21/422988.html

  • WEB服務(wù)器改用UNDERTOW,底層使用JBOSS的XNIO重寫,性能和NETTY有得一比。




  • paulwong 2015-02-14 17:09 發(fā)表評論
    ]]>
    JBOSS資源http://www.aygfsteel.com/paulwong/archive/2013/12/27/408108.htmlpaulwongpaulwongFri, 27 Dec 2013 05:34:00 GMThttp://www.aygfsteel.com/paulwong/archive/2013/12/27/408108.htmlhttp://www.aygfsteel.com/paulwong/comments/408108.htmlhttp://www.aygfsteel.com/paulwong/archive/2013/12/27/408108.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/408108.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/408108.html http://blog.csdn.net/kylinsoong/article/category/1668321

    JBOSS測試
    http://docs.jboss.org/arquillian/reference/1.0.0.Alpha5/en-US/html_single/

    JBOSS安裝工具
    http://tools.jboss.org/downloads/jbosstools/indigo/3.3.2.Final.html

    Java EE 6 Testing Part I – EJB 3.1 Embeddable API
    http://www.samaxes.com/2011/12/javaee-testing-ejb31-embeddable/

    Java EE 6 Testing Part II – Introduction to Arquillian and ShrinkWrap
    http://www.samaxes.com/2012/05/javaee-testing-introduction-arquillian-shrinkwrap/

    !!JBOSS系列 -EJB遠(yuǎn)程調(diào)用-客戶端的配置 
    http://www.cnblogs.com/liutengteng130/p/4270832.html

    JBOSS 8文檔
    https://docs.jboss.org/author/display/WFLY8/Documentation

    paulwong 2013-12-27 13:34 發(fā)表評論
    ]]>
    JBOSS7.1下開發(fā)JMS(HoernetQ)的示例DEMOhttp://www.aygfsteel.com/paulwong/archive/2012/11/21/391720.htmlpaulwongpaulwongWed, 21 Nov 2012 15:30:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/11/21/391720.htmlhttp://www.aygfsteel.com/paulwong/comments/391720.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/11/21/391720.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/391720.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/391720.htmlhttp://my.oschina.net/zhaoqian/blog/90796

    paulwong 2012-11-21 23:30 發(fā)表評論
    ]]>
    ACTIVITI在LINUX下查看流程圖片中文字體出現(xiàn)亂碼的解決方案http://www.aygfsteel.com/paulwong/archive/2012/04/23/376377.htmlpaulwongpaulwongMon, 23 Apr 2012 07:13:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/04/23/376377.htmlhttp://www.aygfsteel.com/paulwong/comments/376377.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/04/23/376377.html#Feedback1http://www.aygfsteel.com/paulwong/comments/commentRss/376377.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/376377.html
    問題解決過程:通過網(wǎng)絡(luò)上搜索資料,發(fā)現(xiàn)是因?yàn)閘inux上jre對中文支持的問題。后來發(fā)現(xiàn)這篇小文章:
    ----------------------------------------------------------------------------------------------

    JDK 6 for linux的中文問題

    在linux下做java開發(fā)已經(jīng)好幾年了,經(jīng)歷了jdk1.4 -> 6.0??粗鴍ava在linux下的中文問題已經(jīng)在慢慢改善。到6.0不做任配置都已經(jīng)能正常運(yùn)行很多中文程序,但可惜還是會有些中文問題。例如運(yùn)行 jedit, netbeans等程序。甚至是自己寫的hello world swing程序的系統(tǒng)菜單都是亂碼的。

    但解決方法很簡單,在JRE 5以上的java環(huán)境中,java會自動加載$JAVA_HOME/jre/lib/fonts/fallback目錄下的字體。鏈接或復(fù)制宋體或微軟雅黑等字體到該目錄即可解決。

    但官方文檔上說此法只適用于swing程序,要讓awt程序也支持中文,還要自己設(shè)字體配置文件。由于我很少會用到awt程序,也就懶得去改了,有需要的朋友請參考Font Configuration Files

    進(jìn)行操作:
    在Windows XP的字體目錄下,找到simsun.ttc的字體文件,重命名為simsun.ttf,然后將該文件復(fù)制到linux的/usr/local/jdk/jre/lib/fonts/fallback/(這個fallback目錄如果不存在則先創(chuàng)建這個目錄)下面,因?yàn)?simsun.ttf 字體文件對應(yīng)的是宋體,則在程序中使用的時(shí)候設(shè)置字體為“宋體”,修改fonts.dir為以下內(nèi)容。

    59
    LucidaBrightRegular.ttf -b&h-lucidabright-medium-r-normal--
    0-0-0-0-p-0-iso8859-1
    LucidaBrightItalic.ttf -b&h-lucidabright-medium-i-normal--
    0-0-0-0-p-0-iso8859-1
    LucidaBrightDemiBold.ttf -b&h-lucidabright-demibold-r-normal--
    0-0-0-0-p-0-iso8859-1
    LucidaBrightDemiItalic.ttf -b&h-lucidabright-demibold-i-normal--
    0-0-0-0-p-0-iso8859-1
    LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-
    0-0-0-0-p-0-iso8859-1
    LucidaSansDemiBold.ttf -b&h-lucidasans-bold-r-normal-sans-
    0-0-0-0-p-0-iso8859-1
    LucidaTypewriterRegular.ttf -b&h-lucidatypewriter-medium-r-normal-sans-
    0-0-0-0-m-0-iso8859-1
    LucidaTypewriterBold.ttf -b&h-lucidatypewriter-bold-r-normal-sans-
    0-0-0-0-m-0-iso8859-1
    LucidaBrightRegular.ttf -b&h-lucidabright-medium-r-normal--
    0-0-0-0-p-0-iso8859-2
    LucidaBrightItalic.ttf -b&h-lucidabright-medium-i-normal--
    0-0-0-0-p-0-iso8859-2
    LucidaBrightDemiBold.ttf -b&h-lucidabright-demibold-r-normal--
    0-0-0-0-p-0-iso8859-2
    LucidaBrightDemiItalic.ttf -b&h-lucidabright-demibold-i-normal--
    0-0-0-0-p-0-iso8859-2
    LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-
    0-0-0-0-p-0-iso8859-2
    LucidaSansDemiBold.ttf -b&h-lucidasans-bold-r-normal-sans-
    0-0-0-0-p-0-iso8859-2
    LucidaTypewriterRegular.ttf -b&h-lucidatypewriter-medium-r-normal-sans-
    0-0-0-0-m-0-iso8859-2
    LucidaTypewriterBold.ttf -b&h-lucidatypewriter-bold-r-normal-sans-
    0-0-0-0-m-0-iso8859-2
    LucidaBrightRegular.ttf -b&h-lucidabright-medium-r-normal--
    0-0-0-0-p-0-iso8859-4
    LucidaBrightItalic.ttf -b&h-lucidabright-medium-i-normal--
    0-0-0-0-p-0-iso8859-4
    LucidaBrightDemiBold.ttf -b&h-lucidabright-demibold-r-normal--
    0-0-0-0-p-0-iso8859-4
    LucidaBrightDemiItalic.ttf -b&h-lucidabright-demibold-i-normal--
    0-0-0-0-p-0-iso8859-4
    LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-
    0-0-0-0-p-0-iso8859-4
    LucidaSansDemiBold.ttf -b&h-lucidasans-bold-r-normal-sans-
    0-0-0-0-p-0-iso8859-4
    LucidaTypewriterRegular.ttf -b&h-lucidatypewriter-medium-r-normal-sans-
    0-0-0-0-m-0-iso8859-4
    LucidaTypewriterBold.ttf -b&h-lucidatypewriter-bold-r-normal-sans-
    0-0-0-0-m-0-iso8859-4
    LucidaBrightRegular.ttf -b&h-lucidabright-medium-r-normal--
    0-0-0-0-p-0-iso8859-5
    LucidaBrightItalic.ttf -b&h-lucidabright-medium-i-normal--
    0-0-0-0-p-0-iso8859-5
    LucidaBrightDemiBold.ttf -b&h-lucidabright-demibold-r-normal--
    0-0-0-0-p-0-iso8859-5
    LucidaBrightDemiItalic.ttf -b&h-lucidabright-demibold-i-normal--
    0-0-0-0-p-0-iso8859-5
    LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-
    0-0-0-0-p-0-iso8859-5
    LucidaSansDemiBold.ttf -b&h-lucidasans-bold-r-normal-sans-
    0-0-0-0-p-0-iso8859-5
    LucidaTypewriterRegular.ttf -b&h-lucidatypewriter-medium-r-normal-sans-
    0-0-0-0-m-0-iso8859-5
    LucidaTypewriterBold.ttf -b&h-lucidatypewriter-bold-r-normal-sans-
    0-0-0-0-m-0-iso8859-5
    LucidaBrightRegular.ttf -b&h-lucidabright-medium-r-normal--
    0-0-0-0-p-0-iso8859-7
    LucidaBrightItalic.ttf -b&h-lucidabright-medium-i-normal--
    0-0-0-0-p-0-iso8859-7
    LucidaBrightDemiBold.ttf -b&h-lucidabright-demibold-r-normal--
    0-0-0-0-p-0-iso8859-7
    LucidaBrightDemiItalic.ttf -b&h-lucidabright-demibold-i-normal--
    0-0-0-0-p-0-iso8859-7
    LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-
    0-0-0-0-p-0-iso8859-7
    LucidaSansDemiBold.ttf -b&h-lucidasans-bold-r-normal-sans-
    0-0-0-0-p-0-iso8859-7
    LucidaTypewriterRegular.ttf -b&h-lucidatypewriter-medium-r-normal-sans-
    0-0-0-0-m-0-iso8859-7
    LucidaTypewriterBold.ttf -b&h-lucidatypewriter-bold-r-normal-sans-
    0-0-0-0-m-0-iso8859-7
    LucidaBrightRegular.ttf -b&h-lucidabright-medium-r-normal--
    0-0-0-0-p-0-iso8859-9
    LucidaBrightItalic.ttf -b&h-lucidabright-medium-i-normal--
    0-0-0-0-p-0-iso8859-9
    LucidaBrightDemiBold.ttf -b&h-lucidabright-demibold-r-normal--
    0-0-0-0-p-0-iso8859-9
    LucidaBrightDemiItalic.ttf -b&h-lucidabright-demibold-i-normal--
    0-0-0-0-p-0-iso8859-9
    LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-
    0-0-0-0-p-0-iso8859-9
    LucidaSansDemiBold.ttf -b&h-lucidasans-bold-r-normal-sans-
    0-0-0-0-p-0-iso8859-9
    LucidaTypewriterRegular.ttf -b&h-lucidatypewriter-medium-r-normal-sans-
    0-0-0-0-m-0-iso8859-9
    LucidaTypewriterBold.ttf -b&h-lucidatypewriter-bold-r-normal-sans-
    0-0-0-0-m-0-iso8859-9
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-ascii-0
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-cns11643-1
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-cns11643-2
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-cns11643-3
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-gb18030.2000-0
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-gb2312.1980-0
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-gbk-0
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-ibm-cp850
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-iso10646-1
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-iso8859-1
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-iso8859-15
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-jisx0208.1983-0
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-jisx0208.1990-0
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-jisx0212.1990-0
    :
    1:simsun.ttf -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-koi8-r
    :
    2:simsun.ttf -misc-SimSun_PUA-medium-r-normal--0-0-0-0-c-0-iso10646-1
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-ascii-0
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-cns11643-1
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-cns11643-2
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-cns11643-3
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-gb18030.2000-0
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-gb2312.1980-0
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-gbk-0
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-ibm-cp850
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-iso10646-1
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-iso8859-1
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-iso8859-15
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-jisx0208.1983-0
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-jisx0208.1990-0
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-jisx0212.1990-0
    simsun.ttf -misc-SimSun-medium-r-normal--
    0-0-0-0-c-0-koi8-r


    重新啟動tomcat服務(wù),運(yùn)行程序,中文正確顯示。該問題解決。

    paulwong 2012-04-23 15:13 發(fā)表評論
    ]]>
    在eclipse中使用jboss熱部署功能http://www.aygfsteel.com/paulwong/archive/2012/02/29/371008.htmlpaulwongpaulwongWed, 29 Feb 2012 08:24:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/02/29/371008.htmlhttp://www.aygfsteel.com/paulwong/comments/371008.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/02/29/371008.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/371008.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/371008.html

    最近看Jboss in action,里面提到Jboss的hot deploy功能,今天動手試了一下了一下,發(fā)現(xiàn)確實(shí)很好用。

     

    首先使用eclipse的Automaticlly publish when resources change 功能 ,設(shè)置一個較短的時(shí)間,比如一秒,那么在編輯保存之后,eclipse會自動發(fā)布更新到j(luò)boss部署目錄。


    在jboss中,可以使用Jmx Console,deploy,undeploy和redeploy。

    例如:C:\Jboss\bin\twiddle invoke "jboss.system:service=MainDeployer" redeploy file://C:\Jboss\server\default\deploy\jbosstest.ear 。即完成對jbosstest.ear的重新部署。

     

    在eclipse中可以把jmx命令行客戶端twiddle配置為外部工具。


     

    這樣,每次修改后,點(diǎn)擊 即可重新部署應(yīng)用程序。

    paulwong 2012-02-29 16:24 發(fā)表評論
    ]]>
    中文JBOSS論壇http://www.aygfsteel.com/paulwong/archive/2012/02/29/370995.htmlpaulwongpaulwongWed, 29 Feb 2012 06:56:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/02/29/370995.htmlhttp://www.aygfsteel.com/paulwong/comments/370995.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/02/29/370995.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/370995.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/370995.htmlhttp://www.jbosschina.org/forum-6-1.html

    paulwong 2012-02-29 14:56 發(fā)表評論
    ]]>
    tomcat 和 jboss的熱部署(熱發(fā)布)問題http://www.aygfsteel.com/paulwong/archive/2012/02/29/370993.htmlpaulwongpaulwongWed, 29 Feb 2012 06:46:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/02/29/370993.htmlhttp://www.aygfsteel.com/paulwong/comments/370993.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/02/29/370993.html#Feedback1http://www.aygfsteel.com/paulwong/comments/commentRss/370993.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/370993.html
    常用的web服務(wù)器一般為tomcat和jboss,現(xiàn)一一做介紹。

    1.tomcat熱部署
    在tomcat中支持熱部署有兩種方式(在原理上來說,這兩種方式是一致的,只是放的位置不同)
    a)在catalina_base\conf\catalina\localhost\中依照manager.xml定義一個xml文件,比如我的項(xiàng)目稱作sodoperation,我們就可以寫一個sodoperation.xml,內(nèi)容如下:

    <context path="/sodoperation" docBase="d:\myportal\sodoperation\src\webapp"/>

    其中,path指的是你在tomcat中的項(xiàng)目名稱,就像manager一樣,docBase是指你的項(xiàng)目所在的web目錄。一直到歡迎頁面為止(也就是web-inf的前一個目錄)。但是一般來說,這個目錄中最好不要有中文,如果有的話,可以在文件開始加入
    <?xml version='1.0" encoding='utf-8' ?>來試一下,即整個文件變?yōu)椋?br />
    <?xml version='1.0" encoding='utf-8' ?>
    <context path="/sodoperation" docBase="d:\myportal\sodoperation\src\webapp"/>

    這樣就可以了,如果用這種廣告,同時(shí)使用myeclipse的部署的話,輕易不要remove,這樣會使文件都會被刪掉,不能持久。所以,建議使用第二種方法。

    b)第二種方法和第一種方法在原理上是一致的,其區(qū)別就是位置的不同,這次在catalina_base\conf下的server.xml,在文件末加入:
    <context path="/sodoperation" docBase="d:\myportal\sodoperation\src\webapp"/>

    解釋和上面一樣,這種方法在啟動tomcat后,會在catalina_base\conf\catalina\localhost\中加入一個與第一種方法的文件。這樣保證,只要對server.xml不做修改,你可以隨便對新生成的文件刪除,對熱部署沒有任何問題

    2.jboss熱部署
    在jboss中做熱部署也有兩種方法,因?yàn)閖obss集成了tomcat,也可以說這兩種方法是在jobss上的一個修改。
    a)修改
    /opt/jboss4.3/jboss-as/server/node1/deploy/jboss-web.deployer/context.xml

    <Context cookies="true" crossContext="true" antiResourceLocking="true" antiJARLocking="true">
    <Manager pathname=""/>
    <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
    </Context>

    加上
    antiResourceLocking="true" antiJARLocking="true",重啟jboss,再用myeclipse Redeploy project的時(shí)候就不需要重啟,部署完了直接開瀏覽器預(yù)覽啦


    paulwong 2012-02-29 14:46 發(fā)表評論
    ]]>
    JBOSS集群安裝http://www.aygfsteel.com/paulwong/archive/2012/02/13/369879.htmlpaulwongpaulwongMon, 13 Feb 2012 08:18:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/02/13/369879.htmlhttp://www.aygfsteel.com/paulwong/comments/369879.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/02/13/369879.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/369879.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/369879.html jboss-5.1.0.GA
    nginx-0.8.15
    centos5.5
    nginx:192.168.1.251
    tomat1:192.168.1.251
    tomat2:192.168.1.252
    jboss安裝目錄為:/usr/local/jboss
    nginx安裝目錄為:/usr/local/nginx

    JDK、JBOSS、nginx安裝略過!

    Jboss1配置:

    /opt/jboss4.3/jboss-as/server/node2/deploy/jboss-web.deployer/server.xml

    <!--由于在LINUX環(huán)境下,會有多個IP,address不能改成${0.0.0.0},這樣會對127.0.0.1也會進(jìn)行監(jiān)聽,導(dǎo)致啟動出錯-->
    <Connector protocol="HTTP/1.1" port="8080" address="${ jboss.bind.address}">

    <!--將<Engine name="jboss.web" defaultHost="localhost">修改為-->
    <Engine name="jboss.web" defaultHost="localhost" jvmRoute="jboss1">

    /opt/jboss4.3/jboss-as/server/node2/deploy/jboss-messaging.sar/messaging-service.xml
    <!--將20行的<attribute name="ServerPeerID">${jboss.messaging.ServerPeerID:0}</attribute>修改-->
    <attribute name="ServerPeerID">${jboss.messaging.ServerPeerID:1}</attribute>

    Jboss2配置:

    /opt/jboss4.3/jboss-as/server/node2/deploy/jboss-web.deployer/server.xml

    <!--由于在LINUX環(huán)境下,會有多個IP,address不能改成${0.0.0.0},這樣會對127.0.0.1也會進(jìn)行監(jiān)聽,導(dǎo)致啟動出錯-->
    <Connector protocol="HTTP/1.1" port="8080" address="${ jboss.bind.address}">

    <!--將<Engine name="jboss.web" defaultHost="localhost">修改為-->
    <Engine name="jboss.web" defaultHost="localhost" jvmRoute="jboss2">

    /opt/jboss4.3/jboss-as/server/node2/deploy/jboss-messaging.sar/messaging-service.xml
    <!--將20行的<attribute name="ServerPeerID">${jboss.messaging.ServerPeerID:0}</attribute>修改-->
    <attribute name="ServerPeerID">${jboss.messaging.ServerPeerID:2}</attribute>

    如果想要session同步的話,要在站點(diǎn)的web.xml里面加入<distributable/>

    測試文件index.jsp內(nèi)容如下:
    <%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding
    ="UTF-8"%>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     
    <%@page import="java.util.*"%>
     
    <%@page import="java.net.InetAddress;"%>
     
    <html>
     
    <head>
     
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     
    <title>Cluster App Test</title>
     
    </head>
     
    <body>
     
    <%
     InetAddress ip 
    = InetAddress.getLocalHost();
     
    //out.println(ip.getHostAddress());
     
    %>
     This is responsed by 
    <font color="red"> <%=ip.getHostAddress() %></font><br>
     Host Name : 
    <font color="red"><%=ip.getHostName() %></font><br>
     Time : 
    <font color="red"><%=new Date() %></font><br>
     
    <%
     ip 
    = null;
     
    %>
    <br/> <br/> <br/> <br/>
    Server Info:
    <%
    out.println(request.getLocalAddr() 
    + " : " + request.getLocalPort()+"<br>");%>
    <%
      out.println(
    "<br>Session ID " + session.getId()+"<br>");
     
    // 如果有新的 Session 屬性設(shè)置
     
    String dataName = request.getParameter("dataName");
     
    if (dataName != null && dataName.length() > 0) {
        
    String dataValue = request.getParameter("dataValue");
         session.setAttribute(dataName, dataValue);
      }
      out.print(
    "<br/> <b>Session 列表</b>");
      Enumeration e 
    = session.getAttributeNames();
     
    while (e.hasMoreElements()) {
        
    String name = (String)e.nextElement();
        
    String value = session.getAttribute(name).toString();
         out.println( name 
    + " = " + value+"<br>");
             System.out.println( name 
    + " = " + value);
       }
    %>
     
    <form action="index.jsp" method="POST">
        名稱:
    <input type=text size=20 name="dataName">
        
    <br>
       
    &nbsp;&nbsp;值:<input type=text size=20 name="dataValue">
        
    <br>
       
    <input type=submit>
      
    </form>
     
    </body>
     
    </html>

    Jboss動好像沒什么要求,,可以兩個同時(shí)啟動,等啟動完之后再啟動NGINX就OK了!

    Jboss的啟動命令為(必須加參數(shù)-b ,很多配置文件都依賴于${ jboss.bind.address}這個值,也就是命令行輸入的IP地址):
    /usr/local/jboss/bin/run.sh -c all -b 192.168.1.251


    等都啟動完成,就可以防問http://192.168.1.251/cluster-test/

    寫一個session,刷新,如果session在不同的機(jī)器上保持不變,那就集成功了!如下圖:



    paulwong 2012-02-13 16:18 發(fā)表評論
    ]]>
    jboss中控制臺jmx-console 登錄的用戶名和密碼設(shè)置http://www.aygfsteel.com/paulwong/archive/2012/02/13/369841.htmlpaulwongpaulwongMon, 13 Feb 2012 03:04:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/02/13/369841.htmlhttp://www.aygfsteel.com/paulwong/comments/369841.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/02/13/369841.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/369841.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/369841.html默認(rèn)情況訪問 http://localhost:8080/jmx-console 就可以瀏覽jboss的部署管理的一些信息,不需要輸入用戶名和密碼,使用起來有點(diǎn)安全隱患。下面我們針對此問題對jboss進(jìn)行配置,使得訪問jmx- console也必須要知道用戶名和密碼才可進(jìn)去訪問。步驟如下:

    i) 找到JBoss安裝目錄/server/default/deploy/jmx-console.war/WEB-INF/jboss-web.xml文 件,去掉<security-domain>java:/jaas/jmx-console</security- domain>的注釋。修改后的該文件內(nèi)容為:

    <jboss-web>
       
    <!-- Uncomment the security-domain to enable security. You will
          need to edit the htmladaptor login configuration to setup the
          login modules used to authentication users.
    -->
          
    <security-domain>java:/jaas/jmx-console</security-domain>
    </jboss-web>


    ii)修改與i)中的jboss-web.xml同級目錄下的web.xml文件,查找到<security-constraint/>節(jié)點(diǎn),去掉它的注釋,修改后該部分內(nèi)容為:

    <!-- A security constraint that restricts access to the HTML JMX console
       to users with the role JBossAdmin. Edit the roles to what you want and
       uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
       secured access to the HTML JMX console.
    -->
       
    <security-constraint>
         
    <web-resource-collection>
           
    <web-resource-name>HtmlAdaptor</web-resource-name>
           
    <description>An example security config that only allows users with the
             role JBossAdmin to access the HTML JMX console web application
           
    </description>
           
    <url-pattern>/*</url-pattern>
           
    <http-method>GET</http-method>
           
    <http-method>POST</http-method>
         
    </web-resource-collection>
         
    <auth-constraint>
           
    <role-name>JBossAdmin</role-name>
         
    </auth-constraint>
       
    </security-constraint>

       在此處可以看出,為登錄配置了角色JBossAdmin。

    iii) 在第一步中的jmx-console安全域和第二步中的運(yùn)行角色JBossAdmin都是在login-config.xml中配置,我們在JBoss安 裝目錄/server/default/conf下找到它。查找名字為:jmx-console的application-policy:

    <application-policy name = "jmx-console">
           
    <authentication>
              
    <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
                 flag 
    = "required">
               
    <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
               
    <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
              
    </login-module>
           
    </authentication>
        
    </application-policy>


    在此處可以看出,登錄的角色、用戶等的信息分別在props目錄下的jmx-console-roles.properties和jmx-console-users.properties文件中設(shè)置,分別打開這兩個文件。
    其中jmx-console-users.properties文件的內(nèi)容如下:

    # A sample users.properties file for use with the UsersRolesLoginModule
    admin
    =admin

    該文件定義的格式為:用戶名=密碼,在該文件中,默認(rèn)定義了一個用戶名為admin,密碼也為admin的用戶,讀者可將其改成所需的用戶名和密碼。
    jmx-console-roles.properties的內(nèi)容如下:

    # A sample roles.properties file for use with the UsersRolesLoginModule
    admin
    =JBossAdmin, HttpInvoker

    該文件定義的格式為:用戶名=角色,多個角色以“,”隔開,該文件默認(rèn)為admin用戶定義了JBossAdmin和HttpInvoker這兩個角色。
    配置完成后讀者可以通過訪問: http://localhost:8088/jmx-console/ ,輸入jmx-console-roles.properties文件中定義的用戶名和密碼,訪問jmx-console的頁面。

    paulwong 2012-02-13 11:04 發(fā)表評論
    ]]>
    JBoss下DataSource加密(下)http://www.aygfsteel.com/paulwong/archive/2012/01/16/368606.htmlpaulwongpaulwongMon, 16 Jan 2012 10:58:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/01/16/368606.htmlhttp://www.aygfsteel.com/paulwong/comments/368606.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/01/16/368606.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/368606.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/368606.html數(shù)據(jù)源文件:my-oracle-ds.xml
    <datasources>
        
    <local-tx-datasource>
            
    <jndi-name>jdbc/my-local</jndi-name>
            <connection-url>
                jdbc:oracle:thin:@10.5.7.30:1521:orcl
            
    </connection-url>
            
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
            <security-domain>EncryptedOracleDbRealm</security-domain>
            
    <exception-sorter-class-name>
                org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
            
    </exception-sorter-class-name>
            
    <metadata>
                
    <type-mapping>Oracle10g</type-mapping>
            
    </metadata>
            
    <depends>
                jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword
            
    </depends>
        
    </local-tx-datasource>



        
    <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
            name
    ="jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword">
            
    <constructor>
                
    <arg type="java.lang.String" value="ServerMasterPassword"></arg>
            
    </constructor>
            
    <!-- The opaque master password file used to decrypt the encrypted
                database password key 
    -->
            
    <attribute name="KeyStorePass">
                {CLASS}org.jboss.security.plugins.FilePassword:${jboss.server.home.dir}/conf/server.password
            
    </attribute>
            
    <attribute name="Salt">abcdefgh</attribute>
            
    <attribute name="IterationCount">13</attribute>
        
    </mbean>

    </datasources>

    在jboss4.3/jboss-as/server/default/conf/login-config.xml中增加節(jié)點(diǎn):

    <application-policy name="EncryptedOracleDbRealm">
        
    <authentication>
            
    <login-module
                
    code="org.jboss.resource.security.JaasSecurityDomainIdentityLoginModule"
                flag
    ="required">
                
    <module-option name="username">username</module-option>
                
    <module-option name="password">
                    3wW33nIpavHK4pd3qoNTbA
                
    </module-option>
                
    <module-option name="managedConnectionFactoryName">
                    jboss.jca:service=LocalTxCM,name=jdbc/my-local
                
    </module-option>
                
    <module-option name="jaasSecurityDomain">
                    jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword
                
    </module-option>
            
    </login-module>
        
    </authentication>
    </application-policy>

    以上的password由下面命令得出:

    E:\JBOSS\jboss4.3\jboss-as\server\default\lib>java -cp jbosssx.jar
    org.jboss.security.plugins.PBEUtils abcdefgh 
    13 master mypassowrd
    Encoded password:  2mqrIBSpp8JVWFAqCBklhf

    生成server.password文件:

    E:\JBOSS\jboss4.3\jboss-as\server\default\lib>java -cp jbosssx.jar
    org.jboss.security.plugins.FilePassword abcdefgh 
    13 master server.password

    產(chǎn)生后拷貝到:${jboss.server.home.dir}/conf中。


    paulwong 2012-01-16 18:58 發(fā)表評論
    ]]>
    JBoss下DataSource加密(上)http://www.aygfsteel.com/paulwong/archive/2012/01/09/368113.htmlpaulwongpaulwongSun, 08 Jan 2012 16:51:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/01/09/368113.htmlhttp://www.aygfsteel.com/paulwong/comments/368113.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/01/09/368113.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/368113.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/368113.html<?xml version="1.0" encoding="UTF-8"?>
    <datasources>
       
    <local-tx-datasource>
         
    <!-- jndi名字 -->
         
    <jndi-name>MySqlDS</jndi-name>
         
    <!--URL地址 --> 
         
    <use-java-context>false</use-java-context>
         
    <connection-url>jdbc:mysql://10.16.175.137:3306/test</connection-url>
         
    <!-- 驅(qū)動 --> 
         
    <driver-class>com.mysql.jdbc.Driver</driver-class>
          
    <!-- 用戶名 --> 
         
    <user-name>root</user-name>
          
    <!-- 密碼 --> 
        
    <password>123456</password>
        
    <exception-sorter-class-name> org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter </exception-sorter-class-name> 
         
    <metadata> 
            
    <type-mapping>mySQL</type-mapping> 
         
    </metadata>
       
    </local-tx-datasource>
    </datasources>

    看一下這個文件,里面用戶名與密碼都是以明文方式存儲的,這樣子對系統(tǒng)的安全而言帶來了極大的威協(xié)。所以我們要為我們這個明文的密碼加一下密,這就是本文的目的.

    2.說到密碼加密,這里我們用到了JBoss下的一個類org.jboss.resource.security.SedureIdentityLoginModule,看看我們該如何用它來幫我們的密碼加密。
    先看個配置數(shù)據(jù)源的例子(mysql-ds.xml)

    <?xml version="1.0" encoding="UTF-8"?>
    <datasources>
    <local-tx-datasource>
    <jndi-name>MySqlDS</jndi-name>
    <use-java-context>false</use-java-context>
    <connection-url>jdbc:mysql://192.168.1.91:3306/atteam</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <!--這里不用寫上你的用戶名與密碼了,我們可以在login-config.xml里做點(diǎn)手腳,就OK了 -->
    <security-domain>EncryptDBPassword</security-domain>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <metadata>
    <type-mapping>mySQL</type-mapping>
    </metadata>
    </local-tx-datasource>
    </datasources>

    接著我們修改server\default\conf\login-config.xml文件,加上下面這一段配置文件

    <application-policy name="EncryptDBPassword">
    <!--這里的name應(yīng)該是你在配置數(shù)據(jù)源時(shí)寫的security-domain里的字符串-->
    <authentication>
    <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
    <!-- 數(shù)據(jù)庫的用戶名 -->
    <module-option name="username">test</module-option>
    <!--數(shù)據(jù)庫的密碼,不過是加密過的了 -->
    <module-option name="password">64c5fd2979a86168</module-option>
    <!-- 注意name等于你的數(shù)據(jù)源的jndi-name,這里是MySqlDS -->
    <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
    </login-module>
    </authentication>
    </application-policy>

    3.補(bǔ)充一下,這個加密的密碼是哪來的

    java -cp "D:\TDdownload\jboss-4.2.0.CR1\jboss-4.2.0.CR1\lib\jboss-jmx.jar;D:\TDdownload\jboss-4.2.0.CR1\jboss-4.2.0.CR1\lib\jboss-common.jar;D:\TDdownload\jboss-4.2.0.CR1\jboss-4.2.0.CR1\server\default\lib\jboss-jca.jar;D:\TDdownload\jboss-4.2.0.CR1\jboss-4.2.0.CR1\server\default\lib\jbosssx.jar" org.jboss.resource.security.SecureIdentityLoginModule 123456 Encoded password: 64c5fd2979a86168


    paulwong 2012-01-09 00:51 發(fā)表評論
    ]]>
    實(shí)戰(zhàn)JBossMQ JMS集群http://www.aygfsteel.com/paulwong/archive/2012/01/08/368110.htmlpaulwongpaulwongSun, 08 Jan 2012 15:58:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/01/08/368110.htmlhttp://www.aygfsteel.com/paulwong/comments/368110.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/01/08/368110.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/368110.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/368110.html數(shù)據(jù)庫服務(wù)器:Oracle 9i2
    操作系統(tǒng):Windows XP SP2
    JBoss版本:4.2.2
    JDK:Sun 1.5.0.13
    網(wǎng)絡(luò)配置:同一機(jī)器的一個網(wǎng)卡上綁定兩個ip地址192.168.1.18和192.168.1.147


    二、配置
    1.配置消息和事務(wù)日志持久保存的數(shù)據(jù)源,從JBoss安裝位置的docs\examples\jca目錄下拷貝到server\all\deploy目錄下,并修改其中的連接配置,這里使用OracleDS作為持久保存的數(shù)據(jù)源。注意:別忘了把Oracle的jdbc驅(qū)動程序拷貝到server\all\lib目錄下。

    2.修改DestinationManager配置,刪除server\all\deploy-hasingleton\jms目錄下的hsqldb-jdbc2-service.xml文件,拷貝docs\examples\jms目錄下的oracle-jdbc2-service.xml到server\all\deploy-hasingleton目錄下,使用OracleDS作為DestinationManager的數(shù)據(jù)源。

    3. 修改StateManager配置,將其中的數(shù)據(jù)源配置由
    jboss.jca:service=DataSourceBinding,name=DefaultDS 
    jboss.jca:service=DataSourceBinding,name=OracleDS

    4. 配置測試的Topic,在server\all\deploy-hasingleton\jms目錄下新建一個名為jbossweek-jms-service.xml文件,
    <mbean code="org.jboss.mq.server.jmx.Topic" name="jboss.mq.destination:service=Topic,name=jbossweekTopic">
            
    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
    </mbean>

    5. 創(chuàng)建node1的服務(wù)器配置,將server\all目錄復(fù)制一份改名為node1

    6. 配置完成。


    三、驗(yàn)證
    1. 分別以run –c all –b192.168.1.17和run –c node1–b192.168.1.148先后啟動all和node1配置。此時(shí)192.168.1.17為主節(jié)點(diǎn),瀏覽http://192.168.1.17:8080/jmx-console/。打開JNDIView可以看到j(luò)bossweekTopic的JNDI名稱。此時(shí)192.168.1.17為主節(jié)點(diǎn),瀏覽http://192.168.1.148:8080/jmx-console/。打開JNDIView就會發(fā)現(xiàn)沒有jbossweekTopic的JNDI名稱。

    2. 關(guān)閉192.168.1.17上的all服務(wù)器,此時(shí)在192.168.1.148上的node服務(wù)器的控制臺上會出現(xiàn)如下信息:
    13:11:13,921 INFO [TreeCache] viewAccepted(): [192.168.1.17:2292|2] [192.168.1.148:2327]
    13:11:14,015 INFO [TreeCache] viewAccepted(): [192.168.1.17:2288|2] [192.168.1.148:2321]
    13:11:14,218 INFO [DefaultPartition] New cluster view for partition DefaultPartition (id: 2, delta: -1) : [192.168.1.148:1099]
    13:11:14,218 INFO [DefaultPartition] I am (192.168.1.148:1099) received members hipChanged event: 13:11:14,218 INFO [DefaultPartition] Dead members: 1 ([192.168.1.17:1099])
    13:11:14,218 INFO [DefaultPartition] New Members : 0 ([])
    13:11:14,218 INFO [DefaultPartition] All Members : 1 ([192.168.1.148:1099])
    13:11:14,453 INFO [TreeCache] viewAccepted(): [192.168.1.17:2279|2] [192.168.1.148:2306]
    13:11:16,218 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy-hasingleton/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
    13:11:17,406 INFO [jbossweekTopic] Bound to JNDI name: topic/jbossweekTopic
    13:11:17,453 INFO [A] Bound to JNDI name: queue/A
    13:11:17,453 INFO [B] Bound to JNDI name: queue/B
    13:11:17,468 INFO [C] Bound to JNDI name: queue/C
    13:11:17,468 INFO [D] Bound to JNDI name: queue/D
    13:11:17,468 INFO [ex] Bound to JNDI name: queue/ex
    13:11:17,484 INFO [testTopic] Bound to JNDI name: topic/testTopic
    13:11:17,500 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
    13:11:17,500 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
    13:11:17,500 INFO [testQueue] Bound to JNDI name: queue/testQueue
    13:11:17,562 INFO [UILServerILService] JBossMQ UIL service available at : /192.168.1.148:8093 13:11:17,609 INFO [DLQ] Bound to JNDI name: queue/DLQ

    3. JMS集群的主節(jié)點(diǎn)自動切換到192.168.1.148上的node1節(jié)點(diǎn),瀏覽http://192.168.1.148:8080/jmx-console/。打開JNDIView就會找到j(luò)bossweekTopic的JNDI名稱。


    http://linliangyi2007.iteye.com/blog/316997
    http://docs.redhat.com/docs/zh-CN/JBoss_Enterprise_Application_Platform/5/html/JBoss_Messaging_User_Guide/index.html

    paulwong 2012-01-08 23:58 發(fā)表評論
    ]]>
    jboss-4.2.x運(yùn)行多個instancehttp://www.aygfsteel.com/paulwong/archive/2012/01/08/368106.htmlpaulwongpaulwongSun, 08 Jan 2012 13:33:00 GMThttp://www.aygfsteel.com/paulwong/archive/2012/01/08/368106.htmlhttp://www.aygfsteel.com/paulwong/comments/368106.htmlhttp://www.aygfsteel.com/paulwong/archive/2012/01/08/368106.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/368106.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/368106.html找到
    mbean服務(wù)中,名字為 ServiceBindingManager 的,里面有個叫做ports-01的內(nèi)容,打開這個注釋,就可以了。

    如果你要運(yùn)行多個,那么就需要有多個ServiceBindingManager ports-02,這是第三個,ports-03這是地四個,

    這個文件,對應(yīng)${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml里面的ports-01部分,ports-02部分,只不過需要在這里啟用,啟動的同時(shí),$JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml里面的就不起作用了。


    paulwong 2012-01-08 21:33 發(fā)表評論
    ]]>
    JBOSS遠(yuǎn)程代碼執(zhí)行漏洞http://www.aygfsteel.com/paulwong/archive/2011/12/31/367630.htmlpaulwongpaulwongSat, 31 Dec 2011 03:28:00 GMThttp://www.aygfsteel.com/paulwong/archive/2011/12/31/367630.htmlhttp://www.aygfsteel.com/paulwong/comments/367630.htmlhttp://www.aygfsteel.com/paulwong/archive/2011/12/31/367630.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/367630.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/367630.html  JBOSS默認(rèn)配置會有一個后臺漏洞,漏洞發(fā)生在jboss.deployment命名空間 中的addURL()函數(shù),該函數(shù)可以遠(yuǎn)程下載一個war壓縮包并解壓訪問http://www.safe3.com.cn:8080/jmx-console/ 后臺,如下圖   下拉找到如下圖所示     點(diǎn)擊flavor=URL,type=DeploymentScanner進(jìn)入 在輸入框中寫入war壓縮文件webshell的url地址,如上圖點(diǎn)擊invoke執(zhí)行界面獲得一個jsp的webshell,如下圖  
    臨時(shí)漏洞修補(bǔ)辦法:給jmx-console加上訪問密碼
    1.在 ${jboss.server.home.dir}/deploy下面找到j(luò)mx-console.war目錄編輯WEB-INF/web.xml文件 去掉 security-constraint 塊的注釋,使其起作用
    2.編輯WEB-INF/classes/jmx-console-users.propertiesserver/default/conf/props/jmx-console-users.properties (version >=4.0.2)和 WEB-INF/classes/jmx-console-roles.properties 或server/default/conf/props/jmx-console-roles.properties(version >=4.0.2) 添加用戶名密碼
    3.編輯WEB-INF/jboss-web.xml去掉 security-domain 塊的注釋 ,security-domain值的映射文件為 login-config.xml (該文件定義了登錄授權(quán)方式)

    paulwong 2011-12-31 11:28 發(fā)表評論
    ]]>
    在LINUX下配置JBOSShttp://www.aygfsteel.com/paulwong/archive/2011/10/28/362221.htmlpaulwongpaulwongFri, 28 Oct 2011 02:18:00 GMThttp://www.aygfsteel.com/paulwong/archive/2011/10/28/362221.htmlhttp://www.aygfsteel.com/paulwong/comments/362221.htmlhttp://www.aygfsteel.com/paulwong/archive/2011/10/28/362221.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/362221.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/362221.html
  • bin/run.sh
    export LANG=zh_CN.GB18030 //使用中文
    JBOSSCONF
    ="default" //SERVER中使用default
  • bin/run.conf
    配置JAVA_OPTS
    if [ "x$JAVA_OPTS" = "x" ]; then
       JAVA_OPTS
    ="-Xms512m -Xmx2048m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.awt.headless=true "
       JAVA_OPTS
    ="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
    #   JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
       JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=10.0.122.132"
    fi
  • /opt/jboss4.3/jboss-as/server/default/deploy/jboss-web.deployer
    改端口和綁定監(jiān)聽所有的IP
        <Connector port="80" address="0.0.0.0"    
             maxThreads
    ="250" maxHttpHeaderSize="8192"
             emptySessionPath
    ="true" protocol="HTTP/1.1"
             enableLookups
    ="false" redirectPort="8443" acceptCount="100"
             connectionTimeout
    ="20000" disableUploadTimeout="true"
        compressableMimeType
    ="text/html,text/xml,text/plain,text/css,text/javascript,application/xhtml+xml,application/x-javascript,application/javascript,text/xhtml" />
  • /opt/jboss4.3/jboss-as/server/default/conf/
    配置LOG4J
       <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
          
    <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
          
    <param name="File" value="${jboss.server.log.dir}/server.log"/>
          
    <param name="Append" value="true"/>
          
    <param name="Threshold" value="ERROR"/>

          
    <!-- Rollover at midnight each day -->
          
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>

          
    <!-- Rollover at the top of each hour
          <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
          
    -->

          
    <layout class="org.apache.log4j.PatternLayout">
             
    <!-- The default pattern: Date Priority [Category] Message\n -->
             
    <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>

             
    <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n 
             <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
        
    -->
          
    </layout>
       
    </appender>
  • /etc/profile
    配置JAVA_HOME等,改完后source /etc/profile,使配置生效
    JAVA_HOME=/usr/java/jdk1.6.0_29
    JRE_HOME
    =/usr/java/jdk1.6.0_29/jre
    PATH
    =$JAVA_HOME/bin:JRE_HOME/bin:$PATH 
    CLASSPATH
    =.:$JAVA_HOME/lib/jt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib 
    export JAVA_HOME JRE_HOME PATH CLASSPATH 
  • 相關(guān)LINUX命令
    # cd /usr/local/jboss-4.2.3.GA/bin 
    #./run.sh //jboss的啟動
    #tail -f nohup.out //查看啟動信息
    #./shutdown.sh -S //jboss的停止
    #ps -ef |grep java //查看jboss的運(yùn)行狀態(tài)
    #kill -9 后加PID //殺進(jìn)程
    #netstat -ntpl //查看端口
    #iptables -F //清除所有防火墻限制


  • paulwong 2011-10-28 10:18 發(fā)表評論
    ]]>
    主站蜘蛛池模板: 泸定县| 沧州市| 沙河市| 龙岩市| 通州市| 汉阴县| 中卫市| 北京市| 青神县| 海阳市| 吉首市| 松溪县| 钦州市| 黄大仙区| 泗阳县| 石屏县| 包头市| 衡南县| 梓潼县| 大连市| 潍坊市| 休宁县| 乌审旗| 中宁县| 台东市| 弥渡县| 东乡族自治县| 明溪县| 多伦县| 巴马| 临洮县| 定兴县| 峨边| 横峰县| 常山县| 健康| 贡嘎县| 孙吴县| 班戈县| 沈阳市| 三门县|