ch13s131.html
来自「详细介绍了jboss3.0的配置等」· HTML 代码 · 共 132 行 · 第 1/2 页
HTML
132 行
<ejb-jar><br>
<display-name>JRMP Custom Socket Tests</display-name><br>
<enterprise-beans><br>
<br>
<session><br>
<description>A trival echo stateless session bean</description><br>
<ejb-name>StatelessSession</ejb-name><br>
<home>org.jboss.test.jrmp.interfaces.StatelessSessionHome</home><br>
<remote>org.jboss.test.jrmp.interfaces.StatelessSession</remote><br>
<ejb-class>org.jboss.test.jrmp.ejb.StatelessSessionBean</ejb-class><br>
<session-type>Stateless</session-type><br>
<transaction-type>Container</transaction-type><br>
</session><br>
<br>
<session><br>
<description>A trival echo stateful session bean</description><br>
<ejb-name>StatefulSession</ejb-name><br>
<home>org.jboss.test.jrmp.interfaces.StatelessSessionHome</home><br>
<remote>org.jboss.test.jrmp.interfaces.StatelessSession</remote><br>
<ejb-class>org.jboss.test.jrmp.ejb.StatelessSessionBean</ejb-class><br>
<session-type>Stateful</session-type><br>
<transaction-type>Container</transaction-type><br>
</session><br>
<br>
</enterprise-beans><br>
<br>
</ejb-jar><br>
</div></div><div class="figure"><p><a name="comp.jboss.xml"></a><b>Figure 13.29. TestCustomSockets Example jboss.xml Descriptor</b></p><div class="literallayout"><br>
<?xml version="1.0"?><br>
<br>
<!-- The jboss.xml descriptor for the jrmp-gzip.jar ejb unit --><br>
<jboss><br>
<container-configurations><br>
<container-configuration><br>
<container-name>Standard Stateless SessionBean</container-name><br>
<!-- Override the container socket factories --><br>
<container-invoker-conf><br>
<Optimized>true</Optimized><br>
<RMIObjectPort>4445</RMIObjectPort><br>
<RMIClientSocketFactory>org.jboss.test.jrmp.ejb.CompressionClientSocketFactory</RMIClientSocketFactory><br>
<RMIServerSocketFactory>org.jboss.test.jrmp.ejb.CompressionServerSocketFactory</RMIServerSocketFactory><br>
</container-invoker-conf><br>
</container-configuration><br>
</container-configurations><br>
<br>
<enterprise-beans><br>
<!-- This section is not really necessary since we are using the default container-name.<br>
It is here to indicate that only the StatelessSession bean is using custom<br>
socket factories.<br>
--><br>
<session><br>
<ejb-name>StatelessSession</ejb-name><br>
<configuration-name>Standard Stateless SessionBean</configuration-name><br>
</session><br>
</enterprise-beans><br>
</jboss><br>
</div></div><p>Note that we specified an RMIObjectPort of 4445 rather than the default value of
4444 used by the default container configurations in the standardjboss.xml descriptor. This is
necessary because JRMP RMI implementation keeps track of the exported object endpoints based
on (port, host, ClientSocketFactory, ServerSocketFactory) rather than just (port, host). If
we had used a port value of 4444 we would see an exception at deployment time indicating that
port 4444 could not be bound because it was already in use. The reason is that the RMI layer
would try to create two ServerSocket instances with the same port,host combination for the
two different (ClientSocketFactory, ServerSocketFactory) combinations. If you don't have a
reason to choose a fixed port the safest RMIObjectPort configuration to use it 0 which allows
the system to bind any available port.</p></div></div><table border="0" cellpadding="0" cellspacing="0" height="65"><tr height="65"><td rowspan="2"><img src="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="432" height="79"></td><td rowspan="2" background="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="100%" align="right" valign="top"><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="doc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/doc.gif" border="0"></a><a href="ch13.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch13.html"><img src="toc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/toc.gif" border="0"></a><a href="ch13s126.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch13s126.html"><img src="prev.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/prev.gif" border="0"></a><a href="ch13s135.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch13s135.html"><img src="next.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/next.gif" border="0"></a></td></tr><tr></tr></table></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?