3 Replies Latest reply on Feb 3, 2009 4:19 AM by stephanefr

    Limited number of retries when looking for remote JNDI.

    stephanefr

      Hi,

      First, I'm French and it's not a good start :). More seriously, my English is not very fluent, so I hope you can understand my problem.

      Then, here's our environment :
      - JBossAS 5.0.0GA with embedded JMS jar file running on windows XP under eclipse ganymede (development environment).

      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 (I've not the file with me now, I'll post it tomorrow).

      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.

        • 1. Re: Limited number of retries when looking for remote JNDI.
          stephanefr

          I've not found how to edit my post, so I post here my 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>
          


          • 2. Re: Limited number of retries when looking for remote JNDI.
            timfox

            All this stuff is application server config, and is not part of the JBoss Messaging project.

            Your best bet is to ask in the app server or JCA users forum.

            • 3. Re: Limited number of retries when looking for remote JNDI.
              stephanefr

              Thanks a lot, it's done.