JBoss RMI 远程调用需要注意的几个问题!
来源:互联网 发布:java.util.date jar包 编辑:程序博客网 时间:2024/06/10 00:43
Created a test app (which is attached) and deployed the ebj3 beans as ejb_app.ejb3 on a jboss-4.0.4RC1 instance (with ejb3 installed via gui installer). Made the following config changes:
run.bat - included the following:
set JAVA_OPTS=-Djava.rmi.server.hostname="24.99.54.78" -Djava.rmi.server.uselocalHostname=false %JAVA_OPTS%
so that the rmi stub for jndi gets the external ip instead of using local one.
jboss-4.0.4RC1/server/default/deploy/ejb3.deployer/META-INF/jboss-service.xml - changed remoting Connector config to:
<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="InvokerLocator">socket://${jboss.bind.address}:3873</attribute> -->
<!-- <attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute> -->
<attribute name="Configuration">
<!-- Using the following <invoker> element instead of the InvokerLocator above because specific attributes needed. -->
<!-- If wanted to use any of the parameters below, can just add them as parameters to the url above if wanted use the InvokerLocator attribute. -->
<config>
<!-- Other than transport type and handler, none of these configurations are required (will just use defaults). -->
<invoker transport="socket">
<attribute name="serverBindAddress">${jboss.bind.address}</attribute>
<attribute name="serverBindPort">3873</attribute>
<attribute name="clientConnectAddress">24.99.54.78</attribute>
<attribute name="clientConnectPort">3873</attribute>
</invoker>
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</config>
</attribute>
</mbean>
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="InvokerLocator">socket://${jboss.bind.address}:3873</attribute> -->
<!-- <attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute> -->
<attribute name="Configuration">
<!-- Using the following <invoker> element instead of the InvokerLocator above because specific attributes needed. -->
<!-- If wanted to use any of the parameters below, can just add them as parameters to the url above if wanted use the InvokerLocator attribute. -->
<config>
<!-- Other than transport type and handler, none of these configurations are required (will just use defaults). -->
<invoker transport="socket">
<attribute name="serverBindAddress">${jboss.bind.address}</attribute>
<attribute name="serverBindPort">3873</attribute>
<attribute name="clientConnectAddress">24.99.54.78</attribute>
<attribute name="clientConnectPort">3873</attribute>
</invoker>
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</config>
</attribute>
</mbean>
Started jboss server using -b flag (i.e. run -b 192.168.1.104)
Then deploy ejb3 to server and run Client class.
- JBoss RMI 远程调用需要注意的几个问题!
- JBoss RMI 远程调用需要注意的几个问题!
- ArcEngine_WPF 需要注意的几个问题
- Ajax需要注意的几个问题
- JBOSS实现RMI时注意的问题
- JBOSS实现RMI时注意的问题
- spring 的 RMI 远程调用
- 关于使用标签需要注意的几个问题
- 使用GDI+时需要注意的几个问题
- 学习IEEE754标准需要注意的几个问题
- Flex开发时需要注意的几个问题
- 视图中需要注意的几个问题
- 使用LIBSVM需要注意的几个问题
- 仿脑计算需要注意的几个问题
- 竞赛中需要注意的几个问题
- 关于ShareUserId需要注意的几个问题
- SSH中需要注意的几个问题
- IO流中需要注意的几个问题
- Turbo C 2.0集成开发环境的使用(2)
- 紧密型系列丛书,IT图书发展的必然趋势
- ORACLE 与SQL SERVER SQL语言比较
- 系统架构的url
- 入门
- JBoss RMI 远程调用需要注意的几个问题!
- jdbc连接各种数据库方式列表
- 10月28日appfuse培训日记
- 图像领域的工具比较
- 美国男子麦当劳快餐吃出死老鼠 索赔170万美元
- tryFirst
- 学习UML的心得
- 10月29日appfuse培训日记
- 20分钟学会Ruby(3/4)