6 Replies Latest reply on Apr 22, 2013 2:53 PM by Justin Bertram

    jboss-as-7.1.1.Final and Tibco EMS 5.1 integration issue

    R M Newbie

      Hi,

       

      I followed the instructions on https://github.com/jbertram/generic-jms-ra for jboss-as-7.1.1.Final and Tibco EMS 5.1 integration.

      Basically I need to have an MDB which consumes messages from Tibco queue.

      But I am unable to establish the connection. Please find details below.

       

      1. Standalone.xml entries:

       

      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">

      <resource-adapters>

      <resource-adapter>

      <archive>

      generic-jms-ra.rar

      </archive>

      <transaction-support>NoTransaction</transaction-support>

      <connection-definitions>

      <connection-definition class-name="org.jboss.resource.adapter.jms.JmsManagedConnectionFactory" jndi-name="java:/GenericJmsXA" enabled="true" use-java-context="true" pool-name="GenericJmsXA" use-ccm="true">

      <config-property name="JndiParameters">

      java.naming.factory.url.pkgs=com.tibco.tibjms.naming;java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory;java.naming.provider.url=ldap:// ldapserver

      </config-property>

      <config-property name="ConnectionFactory">

      QueueConnectionFactory

      </config-property>

      <pool>

      <min-pool-size>0</min-pool-size>

      <max-pool-size>10</max-pool-size>

      <prefill>false</prefill>

      <use-strict-min>false</use-strict-min>

      <flush-strategy>FailingConnectionOnly</flush-strategy>

      </pool>

      <security>

      <application/>

      </security>

      </connection-definition>

      </connection-definitions>

      </resource-adapter>

      </resource-adapters>

      </subsystem>

       

      MDB activation config:

       

      @ResourceAdapter("generic-jms-ra.rar")

      @MessageDriven(name = "RequestProcessorMDB", activationConfig = {

      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),

      @ActivationConfigProperty(propertyName = "destination", propertyValue = "/queue/test.queue"),

      @ActivationConfigProperty(propertyName = "jndiParameters", propertyValue = "java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory;java.naming.provider.url=ldap://ldapserver;java.naming.factory.url.pkgs=com.tibco.tibjms.naming"),

      @ActivationConfigProperty(propertyName = "connectionFactory", propertyValue = "QueueConnectionFactory")

      })

       

       

      Error Logs:

       

      22:28:46,264 INFO [org.jboss.resource.adapter.jms.inflow.JmsActivation] (default-short-running-threads-threads - 1) Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1a072a6(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@2c86aa3 destination=/queue/test.queue destinationType=javax.jms.Queue acknowledgeMode=Auto-acknowledge subscriptionDurability=false reconnectInterval=10 reconnectAttempts=-1 user=null maxMessages=1 minSession=1 maxSession=15 connectionFactory=QueueConnectionFactory jndiParameters=java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory;java.naming.provider.url=ldap://ldapserver;java.naming.factory.url.pkgs=com.tibco.tibjms.naming)

      22:28:46,270 ERROR [org.jboss.resource.adapter.jms.inflow.JmsActivation] (default-short-running-threads-threads - 1) Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1a072a6(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@2c86aa3 destination=/queue/test.queue destinationType=javax.jms.Queue acknowledgeMode=Auto-acknowledge subscriptionDurability=false reconnectInterval=10 reconnectAttempts=-1 user=null maxMessages=1 minSession=1 maxSession=15 connectionFactory=QueueConnectionFactory jndiParameters=java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory;java.naming.provider.url=ldap://ldapserver;java.naming.factory.url.pkgs=com.tibco.tibjms.naming): javax.naming.CannotProceedException; remaining name 'queue/test.queue'

              at javax.naming.spi.ContinuationContext.getTargetContext(ContinuationContext.java:43) [rt.jar:1.6.0_06]

              at javax.naming.spi.NamingManager.getContinuationContext(NamingManager.java:770) [rt.jar:1.6.0_06]

              at com.sun.jndi.toolkit.ctx.PartialCompositeContext.lookup(PartialCompositeContext.java:166) [rt.jar:1.6.0_06]

              at com.sun.jndi.toolkit.ctx.PartialCompositeContext.lookup(PartialCompositeContext.java:148) [rt.jar:1.6.0_06]

              at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_06]

              at org.jboss.resource.adapter.jms.inflow.JmsActivation.lookup(JmsActivation.java:534) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]

              at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:367) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]

              at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupActivation(JmsActivation.java:301) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]

              at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:253) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]

              at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:517) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]

              at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:212) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

              at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

              at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)

              at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

              at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)

              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_06]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

       

       

       

      Not sure why this is happening.

       

      On jboss-5.1.0, the following jms-ds.xml was working fine but not sure how to have similar configuration in 7.1

       

       

      <?xml version="1.0" encoding="UTF-8"?>

       

      <connection-factories>

          <mbean code="org.jboss.naming.ExternalContext"

      name="jboss.jndi:service=ExternalContext,jndiName=ldap">

      <use-java-context>false</use-java-context>

             <attribute name="JndiName">ldap</attribute>

             <attribute name="Properties">

      java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

      java.naming.provider.url=ldap://ldapserver

      java.naming.factory.url.pkgs=com.tibco.tibjms.naming

      java.naming.security.authentication=none

             </attribute>

             <attribute name="RemoteAccess">true</attribute>

             <attribute name="CacheContext">true</attribute>

             <attribute name="InitialContext">javax.naming.InitialContext</attribute>

      </mbean>

       

      <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.messaging:service=JMSProviderLoader,name=TibjmsProvider">

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

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

              <attribute name="QueueFactoryRef">ldap/CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx</attribute>

              <attribute name="TopicFactoryRef">ldap/CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx</attribute>

              <attribute name="FactoryRef">ldap/CN=env,OU=token,OU=ConnectionFactory,OU= test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx </attribute>

      </mbean>

       

       

      <mbean code="org.jboss.naming.NamingAlias" name=":service=NamingAlias,fromName=QueueConnectionFactory">

              <attribute name="ToName">ldap/CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx</attribute>

              <attribute name="FromName">QueueConnectionFactory</attribute>

      </mbean>

       

      <!-- USE any FROM NAME-->

      <mbean code="org.jboss.naming.NamingAlias"

      name=":service=NamingAlias,fromName=queue/test.queue">

      <attribute name="ToName">ldap/CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx</attribute>

      <attribute name="FromName">queue/test.queue</attribute>

      </mbean>

       

       

      </connection-factories>

       

      Appreciate any help ....

        • 1. Re: jboss-as-7.1.1.Final and Tibco EMS 5.1 integration issue
          Stephen Coy Master

          I think you can get a Tibco specific resource adaptor for this purpose.

          • 2. Re: jboss-as-7.1.1.Final and Tibco EMS 5.1 integration issue
            Justin Bertram Master

            Actually, I don't believe Tibco has a JCA RA for this kind of integration.  That's one of the reasons the generic RA exists.

            • 3. Re: jboss-as-7.1.1.Final and Tibco EMS 5.1 integration issue
              Justin Bertram Master

              From what I can tell your configuration is not equivalent between AS5 and AS7.  In AS5 you've got several NamingAlias MBeans to translate a simple look-up string into LDAP jargon.  In AS7 you don't have anything like this which I believe means you should be using the LDAP stuff (e.g. "ldap/CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx") instead of the simple strings (e.g. "/queue/test.queue") for both the destination and the connection factory.

               

              Also, the documentation for the RA project lists a Google Group where you can get help.  I just happen to monitor this forum as well.

              • 5. Re: jboss-as-7.1.1.Final and Tibco EMS 5.1 integration issue
                R M Newbie

                Thanks for the suggestions Justin.

                 

                I tried it but still its not working.

                 

                Tried the following connection strings in the destination and connectionFactory of the MDB activationConfig:

                 

                1> Destination:

                ldap/CN=env,OU=token,OU=Destination,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx

                ConnectionFactory

                ldap/CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx

                 

                2> Destination:

                ldap://CN=env,OU=token,OU=Destination,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx

                ConnectionFactory:

                ldap://CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx

                 

                3> Destination:

                CN=env,OU=token,OU=Destination,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx

                ConnectionFactory:

                CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx

                Exception:

                 

                [Loaded org.apache.tomcat.PeriodicEventListener from jar:file:/users/token/SDK/jboss-as-7.1.1.Final/modules/org/jboss/as/web/main/jbossweb-7.0.13.Final.jar!/]
                18:22:04,049 INFO  [org.jboss.resource.adapter.jms.inflow.JmsActivation] (default-short-running-threads-threads - 1) Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@4d4f6e(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@196d559 destination=ldap/CN=env,OU=token,OU=Destination,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx destinationType=javax.jms.Queue acknowledgeMode=Auto-acknowledge subscriptionDurability=false reconnectInterval=10 reconnectAttempts=-1 user=null maxMessages=1 minSession=1 maxSession=15 connectionFactory=ldap/CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx jndiParameters=java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory;java.naming.provider.url=ldap://ldapserver;java.naming.factory.url.pkgs=com.tibco.tibjms.naming)
                18:22:04,064 ERROR [org.jboss.resource.adapter.jms.inflow.JmsActivation] (default-short-running-threads-threads - 1) Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@4d4f6e(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@196d559 destination=ldap/CN=env,OU=token,OU=Destination,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx destinationType=javax.jms.Queue acknowledgeMode=Auto-acknowledge subscriptionDurability=false reconnectInterval=10 reconnectAttempts=-1 user=null maxMessages=1 minSession=1 maxSession=15 connectionFactory=ldap/CN=env,OU=token,OU=ConnectionFactory,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx jndiParameters=java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory;java.naming.provider.url=ldap://ldapserver;java.naming.factory.url.pkgs=com.tibco.tibjms.naming): javax.naming.InvalidNameException: ldap: [LDAP: error code 34 - 0000208F: NameErr: DSID-031001BF, problem 2006 (BAD_NAME), data 8350, best match of:
                        'ldap'
                ]; remaining name 'ldap/CN=env,OU=token,OU=Destination,OU=test.queue,OU=jmsObjects,OU=jms,OU=Apps,O=xxx'
                        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2943) [rt.jar:1.6.0_06]
                        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2758) [rt.jar:1.6.0_06]
                        at com.sun.jndi.ldap.LdapCtx.c_lookup(LdapCtx.java:997) [rt.jar:1.6.0_06]
                        at com.sun.jndi.toolkit.ctx.ComponentContext.c_resolveIntermediate_nns(ComponentContext.java:152) [rt.jar:1.6.0_06]
                        at com.sun.jndi.toolkit.ctx.AtomicContext.c_resolveIntermediate_nns(AtomicContext.java:342) [rt.jar:1.6.0_06]
                        at com.sun.jndi.toolkit.ctx.ComponentContext.p_resolveIntermediate(ComponentContext.java:381) [rt.jar:1.6.0_06]
                        at com.sun.jndi.toolkit.ctx.ComponentContext.p_lookup(ComponentContext.java:515) [rt.jar:1.6.0_06]
                        at com.sun.jndi.toolkit.ctx.PartialCompositeContext.lookup(PartialCompositeContext.java:159) [rt.jar:1.6.0_06]
                        at com.sun.jndi.toolkit.ctx.PartialCompositeContext.lookup(PartialCompositeContext.java:148) [rt.jar:1.6.0_06]
                        at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_06]
                        at org.jboss.resource.adapter.jms.inflow.JmsActivation.lookup(JmsActivation.java:534) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]
                        at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:367) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]
                        at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupActivation(JmsActivation.java:301) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]
                        at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:253) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]
                        at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:517) [generic-jms-ra-jar-1.0.RC2-SNAPSHOT.jar:]
                        at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:212) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
                        at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
                        at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)
                        at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
                        at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)
                        at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_06]
                        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

                 

                 

                Please help me in getting past this issue ....

                • 6. Re: jboss-as-7.1.1.Final and Tibco EMS 5.1 integration issue
                  Justin Bertram Master

                  The failure is happening in the JNDI look-up in code that doesn't belong to the JCA RA (i.e. com.sun.jndi.ldap.LdapCtx) so there's not a lot I can do.  I'm not familiar with JNDI lookups in LDAP.

                   

                  I recommend you write a simple client that can do the JNDI look-ups and then use the same JNDI context properties and look-up names with the generic JMS JCA RA.