1 Reply Latest reply: May 24, 2012 10:56 PM by krhiggins RSS

JNDI Lookup exception while accessing remote queue from local bridge

krhiggins Newbie

Trying to setup bridge between JBoss-5.2 (/production) and JBoss-4.2 (/all). We have jbossmq jar installed on JBoss-5.2 and everything works great when connecting from JBoss-5.2 to JBoss-4.2 on port 1099 for lookup.  However, when JBoss-4.2 is on 1100, we are not able to perform initial JNDI lookup to remote queue ("/queue/MyQueueRemote" below), resulting in NameNotFoundException for the remote queue.  It appears the lookup for the remote queue ("/queue/MyQueueRemote") is actually trying to find it on the LOCAL server, even though we have the  RemoteJMSProvider java.naming.provider.url  pointing to the remote host and HAJNDI port.

 

We have created a standalone (command line) client that can do the 1100 HAJNDI lookup from the local to the remote OK (outside of JBoss runtime) and get then get a connection to "/queue/MyQueueRemote", so we know it's running on the remote.  Thus, it appears that it's a local issue related to how JBoss is looking up remote queues within a local bridge

 

 

Any suggestions/assistance would be greatly appreciated.  Thanks in advance.

 

 

LOCALE jms-ds.xml


<!-- LOCAL JMSProvider -->

<mbean code="org.jboss.jms.jndi.JMSProviderLoader"

  name="jboss.messaging:service=JMSProviderLoader,name=LocalJMSProvider">

<depends>jboss.messaging.destination:service=Queue,name=MyQueueLocal</depends>

<attribute name="ProviderName">LocalJMSProvider</attribute>

<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>

<attribute name="FactoryRef">java:/ConnectionFactory</attribute>

<attribute name="QueueFactoryRef">java:/ConnectionFactory</attribute>

<attribute name="TopicFactoryRef">java:/ConnectionFactory</attribute>

</mbean>


<!-- REMOTE JMSProvider -->

<mbean code="org.jboss.jms.jndi.JMSProviderLoader"

name="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider">

<attribute name="ProviderName">RemoteJMSProvider</attribute>

<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>

<attribute name="FactoryRef">SSLUIL2ConnectionFactory</attribute>

<attribute name="QueueFactoryRef">SSLUIL2ConnectionFactory</attribute>

<attribute name="TopicFactoryRef">SSLUIL2ConnectionFactory</attribute>

<attribute name="Properties">

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

java.naming.provider.url=jnp://233......:1100

</attribute>

</mbean>


<!-- Bridge between LOCAL and REMOTE -->

<mbean code="org.jboss.jms.server.bridge.BridgeService"

name="jboss.messaging:service=Bridge,name=MyQueueBridge"

xmbean-dd="xmdesc/Bridge-xmbean.xml">

<depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=LocalJMSProvider</depends>

<depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider</depends>

<attribute name="SourceDestinationLookup">/queue/MyQueueLocal</attribute>

<attribute name="TargetDestinationLookup">/queue/MyQueueRemote</attribute>

<attribute name="TargetUsername">remoteUsername</attribute>

<attribute name="TargetPassword">remotePassword</attribute>

<attribute name="QualityOfServiceMode">0</attribute>

<attribute name="MaxBatchSize">50</attribute>

<attribute name="MaxBatchTime">5000</attribute>

<attribute name="FailureRetryInterval">60000</attribute>

<attribute name="MaxRetries">-1</attribute>

<attribute name="AddMessageIDInHeader">false</attribute>

</mbean>

 

 

LOCAL destinations-service.xml


<!-- LOCAL Queue -->


<mbean code="org.jboss.jms.server.destination.QueueService"

      name="jboss.messaging.destination:service=Queue,name=MyQueueLocal"

      xmbean-dd="xmdesc/Queue-xmbean.xml">

      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>

      <depends>jboss.messaging:service=PostOffice</depends>

</mbean>