[jboss-user] [Clustering/JBoss] - Re: HAJNDI failover exception

davidchen do-not-reply at jboss.com
Thu May 22 15:34:20 EDT 2008

Thank you very much Brain for quick reply. Here, I just want to list my couple cents on that issue which may help for others:
1. number of retries to get connection from pool is by default the maximum value, 30. That's the reason, it keeps trying for about 30 seconds (about a second every try). 
So, I reduced that number to the minimum value 1 by adding following attribute

  | 	<attribute name="numberOfRetries" isParam="true">1</attribute>
inside jboss-service.xml, like:

  |       <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="dataType" isParam="true">invocation</attribute>
  |                <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
  |                <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
  |                <!-- This will be port on which the marshall loader port runs on.  -->
  |                <!-- <attribute name="loaderport" isParam="true">4447</attribute> -->
  |                <!-- The following are specific to socket invoker -->
  |                <!-- <attribute name="numAcceptThreads">1</attribute>-->
  |                <!-- <attribute name="maxPoolSize">303</attribute>-->
  |                <!-- <attribute name="clientMaxPoolSize" isParam="true">304</attribute>-->
  |                <attribute name="socketTimeout" isParam="true">600000</attribute>
  |                <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
  |                <attribute name="serverBindPort">4446</attribute>
  |                <!-- <attribute name="clientConnectAddress"></attribute> -->
  |                <!-- <attribute name="clientConnectPort">7777</attribute> -->
  |                <attribute name="enableTcpNoDelay" isParam="true">true</attribute>
  | 			   <attribute name="numberOfRetries" isParam="true">1</attribute>

2. Cache ejb home in client code will help a lot:
It seems failover and raise that connection exception only whenever I did a new jndi lookup for an ejb.  So, in my client code, I cache ejb home as much as I can, which will avoid those connection retries a lot. 

Again, any further hints or suggestions are highly appreciated. Thanks a lot again for the help.


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

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

More information about the jboss-user mailing list