[jboss-user] [Remoting] - Re: Why so many retries?

ron.sigal@jboss.com do-not-reply at jboss.com
Wed Jan 14 01:18:45 EST 2009


"mohitanchlia" wrote : 
  | Is there a way to change the timeout and make it applicable only for certain EJBs. The change timeout=xxxx is a global change but what I really want is to apply it to only certain EJB invocations.
  | 

Well, one thing you could try would be to create multiple EJB3 Connectors in $JBOSS_HOME/server/$CONFIG/deploy/ejb3.deployer/META-INF/jboss-service.xml, each with a different "timeout" value, and associate different JNDI bindings with the different Connectors.  For example, something like this in jboss.xml:


  |     <session>
  |       <ejb-name>SampleEjb3Bean</ejb-name>
  |       <remote-binding>
  |         <jndi-name>SampleEjb3Bean/fasttimeout</jndi-name>
  |         <client-bind-url>
  |           socket://${jboss.bind.address}:3873/?timeout=1000
  |         </client-bind-url>
  |       </remote-binding>
  |       <remote-binding>
  |         <jndi-name>SampleEjb3Bean/slowtimeout</jndi-name>
  |         <client-bind-url>
  |           socket://${jboss.bind.address}:3873/?timeout=3600000
  |         </client-bind-url>
  |       </remote-binding>
  |     </session>
  | 

where the InvokerLocators for the two Connectors would be "socket://${jboss.bind.address}:3873/?timeout=1000" and "socket://${jboss.bind.address}:3873/?timeout=3600000".  Then, you could get two proxies for the same EJB3, and use each as appropriate.

Note: I haven't tried it.  If it works for you, let us know.

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

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



More information about the jboss-user mailing list