[jboss-user] [JCA/JBoss] - Limited number of retries when looking for remote JNDI (copi

StephaneFR do-not-reply at jboss.com
Tue Feb 3 04:19:13 EST 2009


Hello,

I've post my question in the JBoss Messaging forum but timfox ask me to post it in this forum instead. So, I copy / paste my original post  (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=149680) :

Here's our environment :
- JBossAS 5.0.0GA with embedded jar files running on windows XP under eclipse ganymede (development environment).
- JBoss Messaging 1.4.2 GA

We have two JBossAS servers running on two physicals separated servers. One produce messages (let's call it serverP), the other consume them through a MDB (call it serverC).
We are not using bridges or clusters. We are using default configuration files with only jms-ds.xml modified to activate remote JNDI.
ServerC is connected to serverP via remote JNDI configured in jms-ds.xml.

When servers starts together, all is working fine.
When serverC starts alone, the JNDI lookup failed and 5 retries are done (one every 10 seconds). If serverP starts after these 5 retries, the connection between the two servers is not established and the only way we have found to force the reconnection is to restart serverC after serverP has started. This must not be the case in production environment.

We have tried to put the property jnp.maxRetries to -1 but it seems this is only working in clustered configuration.
We don't want to use clusters because in this case, we must declare a database datasource for storing waiting messages and we don't want to add more load to our database.

Is-it possible that serverC retries the lookup until it success ?

Thanks a lot,

Stephane.

The jms-ds.xml file (without original comments) :
<?xml version="1.0" encoding="UTF-8"?>
  | 
  | <connection-factories>
  |   <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
  |       name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider,server=mf060114">
  |     <attribute name="ProviderName">QueuehostJMSProvider</attribute>
  |     <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
  |     <attribute name="FactoryRef">java:/ConnectionFactory</attribute>
  |     <attribute name="QueueFactoryRef">ConnectionFactory</attribute>
  |     <attribute name="TopicFactoryRef">ConnectionFactory</attribute>
  |     <attribute name="Properties">
  |        java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  |        java.naming.factory.url.pkgs=org.jnp.interfaces
  |        java.naming.provider.url=mf060114:1099
  |     </attribute>
  |   </mbean>
  |   
  |    <tx-connection-factory>
  |       <jndi-name>JmsXA</jndi-name>
  |       <xa-transaction/>
  |       <rar-name>jms-ra.rar</rar-name>
  |       <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
  |       <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
  |       <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/RemoteJMSProvider</config-property>
  |       <max-pool-size>20</max-pool-size>
  |       <security-domain-and-application>JmsXARealm</security-domain-and-application>
  |       <depends>jboss.messaging:service=ServerPeer</depends>
  |    </tx-connection-factory>
  | 
  | </connection-factories>
  | 

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

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



More information about the jboss-user mailing list