[jboss-user] [EJB/JBoss] - Socket Timeout with EJB2 on JBoss v4.0.5GA?

klester do-not-reply at jboss.com
Wed Mar 11 16:52:53 EDT 2009


JBoss 5 seems to support timing out sockets if an EJB method takes too long.  This is done via adding a "timeout" parameter to the the connector configuration in the ejb3.deployer/META-INF/jboss-service.xml.

Is there an equivalent to this with EJB2?  We have noticed that our clients sometimes hang while calling a remote EJB method, and we would like to add a timeout so that the clients will give up after a set amount of time.  I have modified my jboss-bean.deployer/META-INF/jboss-service.xml file to include a connector that times out similar to the EJB3 version, but it does not work.

My modified jboss-service.xml is below:


  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <server>
  | 
  |    <!--
  |       The JBoss Bean Deployer
  |    -->
  |    <mbean code="org.jboss.kernel.deployment.jboss.JBossBeanDeployer"
  |           name="jboss.bean:service=JBossBeanDeployer">
  | 
  |       <attribute name="Extension">.beans</attribute>
  |       <attribute name="MetaDataURL">META-INF/jboss-beans.xml</attribute>
  |    </mbean>
  | 
  |    <mbean code="org.jboss.remoting.transport.Connector"
  |           xmbean-dd="org/jboss/remoting/transport/Connector.xml"
  |           name="jboss.remoting:type=Connector,transport=socket3873,handler=ejb2Deployer">
  |         <depends>jboss.aop:service=AspectDeployer</depends>
  |         <attribute name="InvokerLocator">socket://0.0.0.0:3873/?timeout=30000</attribute>
  |         <attribute name="Configuration">
  |                 <handlers>
  |                         <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
  |                 </handlers>
  |         </attribute>
  |    </mbean>
  | 
  | </server>

Is it even possible to time out remote ejb calls in EJB2 the same as can be done with EJB3?  If so, does anyone see what I am missing/doing wrong?

Thanks in advance

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217174#4217174

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217174



More information about the jboss-user mailing list