Sealyu

          --- 博客已遷移至: http://www.sealyu.com/blog

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks

          1.首先修改jboss-service.xml,在ejb端口1098附近,修改CallByValue值為true
          <attribute name="CallByValue">true</attribute>

          2.然后修改ejb3.deployer中jboss-service.xml文件,主要是添加域名到3873的調用中
             <mbean code="org.jboss.remoting.transport.Connector"
                    xmbean-dd="org/jboss/remoting/transport/Connector.xml"
                    name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
                <depends>jboss.aop:service=AspectDeployer</depends>
                <attribute name="Configuration">
              <config>
               <invoker transport="socket">
               <attribute name="numAcceptThreads">1</attribute>
               <attribute name="maxPoolSize">300</attribute>
               <attribute name="clientMaxPoolSize" isParam="true">50</attribute>
               <attribute name="timeout" isParam="true">60000</attribute>
               <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
               <attribute name="serverBindPort">3873</attribute>
               <!-- that's the important setting -->
               <attribute name="clientConnectAddress">10.104.46.119</attribute>
               <attribute name="clientConnectPort">3873</attribute>
               <attribute name="backlog">200</attribute>
               </invoker>
               <handlers>
               <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
               </handlers>
              </config>
                </attribute>
             </mbean>

          3.設置java啟動選項,添加rmi-server的外部地址和禁用本地域名解析到啟動腳本
          Windows腳本例:set JAVA_OPTS=-Djava.rmi.server.hostname= external IP -Djava.rmi.server.useLocalHostname=false
          Unix腳本例:添加到jboss啟動配置文件run.conf中即可。

          4.用run.sh --host=192.168.1.25啟動服務或添加--host=192.168.1.25到啟動腳本。

          1.在使用Jboss 4.2GA 遇到的問題. 以下是以default 模式啟動的Jboss .啟動參數 -c default /all
          (1). localhost可以訪問與本機IP不能訪問
          解決方式:
          修改JBOSS_HOME"server"default"deploy"jboss-web.deployer下的server.xml 將address改為0.0.0.0或者你的實際IP 重啟 JBOSS 然后就可以通過ip訪問。

          (3)在windows 客戶端調用 Linux 服務端 遇到org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://127.0.0.1:3873/]
          解決方法: 修改 JBOSS_HOME/server/default/deploy/ejb3.deployer/META-INF/jboss-services.xml 文件中的${jboss.bind.address}:3873 為linux_home_ip:3873

          以上兩個問題也可以通過以下設置解決:
          For Windows, use
          run.bat -b 0.0.0.0

          for Linux use
          run.sh -b 0.0.0.0

          posted on 2009-10-29 10:19 seal 閱讀(902) 評論(0)  編輯  收藏 所屬分類: web服務器
          主站蜘蛛池模板: 隆化县| 齐齐哈尔市| 罗平县| 交城县| 吐鲁番市| 五家渠市| 宜丰县| 丰顺县| 普陀区| 忻城县| 锦州市| 郯城县| 房产| 深泽县| 临沭县| 厦门市| 锡林郭勒盟| 都江堰市| 华蓥市| 吴川市| 高要市| 宝清县| 慈溪市| 稷山县| 康乐县| 德庆县| 闸北区| 金川县| 罗源县| 镇雄县| 新乡市| 武邑县| 筠连县| 治多县| 磐安县| 开平市| 衡阳市| 万全县| 门头沟区| 凭祥市| 荔浦县|