4 Replies Latest reply on Apr 3, 2008 5:38 AM by Nehru Dinakaran

    JBoss 4.0.2 and Tibco Integration question

    mandar Newbie

      Hi,
      I am trying to integrate JBoss 4.0.2 with Tibco EMS. Thanks to the jboss team and folks who post on the forum, I was able to make the necessary changes in jms-ds.xml and other files to load the tibco provider.

      I have a POJO JMSClient running in jboss (not a MDB). EMS server has security enabled and I am using the correcr userid/password for the queues. JmsClient connects to EMS, sends a message on a queue (example queue A) , receives a response from another queue (example queue A.reply) and then disconnects.

      I am using a no-txn-connection-factory because I do not need XA support.

      I am facing the folliowing issues

      1) The client is able to send a message to a queue (for example queue A) however it is not able to receive a response from another queue (for example queue A.reply). I can see the reply on the queue using show message and also i can see the receiver (my client) connected to the queue.
      Not sure why the client is unable to pick up the message.
      The code was using selector JMSCorrelationID ='XYZ' (XYZ is the actual correct value). However it does not work even if I remove the selecor.

      Relevant section from stdout.log file
      ------------------------------------
      2005-12-02 00:23:53,431 DEBUG [AuthenticationMapper] In mapAuthenticationRequest
      2005-12-02 00:23:54,012 DEBUG [JmsClient] jmsObj class = org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl
      2005-12-02 00:23:54,012 TRACE [JmsSessionFactoryImpl] mcf=org.jboss.resource.adapter.jms.JmsManagedConnectionFactory@b9387a4, cm=org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy@104b5ae, type=1
      2005-12-02 00:23:54,012 TRACE [JmsConnectionFactoryImpl] Created queue connection: org.jboss.resource.adapter.jms.JmsSessionFactoryImpl@17fc1e7
      2005-12-02 00:23:54,012 DEBUG [JmsClient] after creating connection
      2005-12-02 00:23:54,012 TRACE [JmsSessionFactoryImpl] Allocating session for org.jboss.resource.adapter.jms.JmsSessionFactoryImpl@17fc1e7 with request info=org.jboss.resource.adapter.jms.JmsConnectionRequestInfo@4155c62c
      2005-12-02 00:23:54,012 TRACE [NoTxConnectionManager] subject: Subject:
      Principal: jbosslookup
      Private Credential: javax.resource.spi.security.PasswordCredential@a0aae311

      2005-12-02 00:23:54,012 DEBUG [IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 450000
      2005-12-02 00:23:54,012 TRACE [JmsManagedConnection] connection request info: org.jboss.resource.adapter.jms.JmsConnectionRequestInfo@4155c62c
      2005-12-02 00:23:54,022 TRACE [JmsManagedConnection] jms credentials: org.jboss.resource.adapter.jms.JmsCred@4e94a4{ username=jbosslookup, password=**** }
      2005-12-02 00:23:54,202 DEBUG [JmsManagedConnection] created connection: QueueConnection[ClientId=null Connected=tcp://WKL86YBV71:7222, URL=tcp://WKL86YBV71:7222]
      2005-12-02 00:23:54,202 DEBUG [JmsManagedConnection] Using a non-XA QueueConnection. It will not be able to participate in a Global UOW
      2005-12-02 00:23:54,202 DEBUG [JmsManagedConnection] xaQueueSession=null, queueSession=com.tibco.tibjms.TibjmsQueueSession@1a2f9dd
      2005-12-02 00:23:54,202 DEBUG [JmsManagedConnection] transacted=false, ack=1
      2005-12-02 00:23:54,202 TRACE [JmsManagedConnection] created new managed connection: org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01
      2005-12-02 00:23:54,202 DEBUG [JmsManagedConnection] ConnectionEvent listener added: org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener@13ddcf1[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 handles=0 lastUse=1133501034202 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@748417 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@18c14b3]
      2005-12-02 00:23:54,202 TRACE [JBossManagedConnectionPool] supplying new ManagedConnection: org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener@13ddcf1[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 handles=0 lastUse=1133501034202 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@748417 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@18c14b3]
      2005-12-02 00:23:54,202 TRACE [JBossManagedConnectionPool] Got connection from pool org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener@13ddcf1[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 handles=0 lastUse=1133501034202 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@748417 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@18c14b3] [InUse/Available/Max]: [1/19/20]
      2005-12-02 00:23:54,212 TRACE [JmsSession] new JmsSession org.jboss.resource.adapter.jms.JmsSession@4a1bda mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 cri=org.jboss.resource.adapter.jms.JmsConnectionRequestInfo@4155c62c
      2005-12-02 00:23:54,212 TRACE [CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.NoTxConnectionManager@16a93b8, connection : org.jboss.resource.adapter.jms.JmsSession@4a1bda, key: null
      2005-12-02 00:23:54,212 TRACE [JmsSessionFactoryImpl] Allocated org.jboss.resource.adapter.jms.JmsSessionFactoryImpl@17fc1e7 session=org.jboss.resource.adapter.jms.JmsSession@4a1bda
      2005-12-02 00:23:54,212 DEBUG [JmsClient] after creating queueSession
      2005-12-02 00:23:54,212 TRACE [JmsSession] getSession com.tibco.tibjms.TibjmsQueueSession@1a2f9dd for org.jboss.resource.adapter.jms.JmsSession@4a1bda
      2005-12-02 00:23:54,212 TRACE [JmsSession] createQueue com.tibco.tibjms.TibjmsQueueSession@1a2f9dd queueName=queue.secmgr
      2005-12-02 00:23:54,212 TRACE [JmsSession] createdQueue com.tibco.tibjms.TibjmsQueueSession@1a2f9dd queue=Queue[queue.secmgr]
      2005-12-02 00:23:54,212 TRACE [JmsSession] getSession com.tibco.tibjms.TibjmsQueueSession@1a2f9dd for org.jboss.resource.adapter.jms.JmsSession@4a1bda
      2005-12-02 00:23:54,212 TRACE [JmsSession] createProducer com.tibco.tibjms.TibjmsQueueSession@1a2f9dd dest=Queue[queue.secmgr]
      2005-12-02 00:23:54,212 TRACE [JmsSession] getSession com.tibco.tibjms.TibjmsQueueSession@1a2f9dd for org.jboss.resource.adapter.jms.JmsSession@4a1bda
      2005-12-02 00:23:54,212 TRACE [JmsSession] createdProducer com.tibco.tibjms.TibjmsQueueSession@1a2f9dd producer=QueueSender[queue=queue.secmgr]
      2005-12-02 00:23:54,212 TRACE [JmsSession] getSession com.tibco.tibjms.TibjmsQueueSession@1a2f9dd for org.jboss.resource.adapter.jms.JmsSession@4a1bda
      2005-12-02 00:23:54,212 TRACE [JmsSession] createTextMessagecom.tibco.tibjms.TibjmsQueueSession@1a2f9dd
      2005-12-02 00:23:54,212 TRACE [JmsSession] getSession com.tibco.tibjms.TibjmsQueueSession@1a2f9dd for org.jboss.resource.adapter.jms.JmsSession@4a1bda
      2005-12-02 00:23:54,212 TRACE [JmsSession] createQueue com.tibco.tibjms.TibjmsQueueSession@1a2f9dd queueName=queue.secmgr.reply
      2005-12-02 00:23:54,212 TRACE [JmsSession] createdQueue com.tibco.tibjms.TibjmsQueueSession@1a2f9dd queue=Queue[queue.secmgr.reply]
      2005-12-02 00:23:54,212 DEBUG [JmsClient] sent MSG[2B651B1B24] :<?xml version="1.0" encoding="UTF-8"?>
      mandarXXXXX
      2005-12-02 00:23:54,212 TRACE [JmsSession] Closing session
      2005-12-02 00:23:54,212 TRACE [JmsManagedConnection] Sending connection event: 1
      2005-12-02 00:23:54,212 TRACE [CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.NoTxConnectionManager@16a93b8, object: org.jboss.resource.adapter.jms.JmsSession@4a1bda, key: null
      2005-12-02 00:23:54,212 TRACE [NoTxConnectionManager] unregisterConnection: 0 handles left
      2005-12-02 00:23:54,212 TRACE [JBossManagedConnectionPool] putting ManagedConnection back into pool kill=false cl=org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener@13ddcf1[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 handles=0 lastUse=1133501034202 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@748417 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@18c14b3]
      2005-12-02 00:23:54,212 TRACE [JBossManagedConnectionPool] Returning connection to pool org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener@13ddcf1[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 handles=0 lastUse=1133501034212 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@748417 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@18c14b3] [InUse/Available/Max]: [0/20/20]
      2005-12-02 00:23:54,212 DEBUG [JmsClient] successfully closed queueSession
      2005-12-02 00:23:54,212 TRACE [JmsSessionFactoryImpl] close() org.jboss.resource.adapter.jms.JmsSessionFactoryImpl@17fc1e7
      2005-12-02 00:23:54,212 DEBUG [JmsClient] successfully closed connection
      2005-12-02 00:23:54,212 DEBUG [JmsClient] attempting to retrieve msg[JMSCorrelationID ='2B651B1B24'] from queue :queue.secmgr.reply
      2005-12-02 00:23:54,212 DEBUG [JmsClient] jmsObj class = org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl
      2005-12-02 00:23:54,222 TRACE [JmsSessionFactoryImpl] mcf=org.jboss.resource.adapter.jms.JmsManagedConnectionFactory@b9387a4, cm=org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy@104b5ae, type=1
      2005-12-02 00:23:54,222 TRACE [JmsConnectionFactoryImpl] Created queue connection: org.jboss.resource.adapter.jms.JmsSessionFactoryImpl@157566d
      2005-12-02 00:23:54,222 DEBUG [JmsClient] after creating connection
      2005-12-02 00:23:54,222 TRACE [JmsSessionFactoryImpl] Allocating session for org.jboss.resource.adapter.jms.JmsSessionFactoryImpl@157566d with request info=org.jboss.resource.adapter.jms.JmsConnectionRequestInfo@4155c62c
      2005-12-02 00:23:54,222 TRACE [NoTxConnectionManager] subject: Subject:
      Principal: jbosslookup
      Private Credential: javax.resource.spi.security.PasswordCredential@a0aae311

      2005-12-02 00:23:54,222 TRACE [JmsManagedConnection] Looking for connection matching credentials: org.jboss.resource.adapter.jms.JmsCred@eb203b{ username=jbosslookup, password=**** }
      2005-12-02 00:23:54,222 TRACE [JmsManagedConnection] Found matching connection: org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01
      2005-12-02 00:23:54,222 TRACE [JBossManagedConnectionPool] supplying ManagedConnection from pool: org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener@13ddcf1[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 handles=0 lastUse=1133501034212 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@748417 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@18c14b3]
      2005-12-02 00:23:54,222 TRACE [JBossManagedConnectionPool] Got connection from pool org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener@13ddcf1[state=NORMAL mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 handles=0 lastUse=1133501034212 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubjectAndCri@748417 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@18c14b3] [InUse/Available/Max]: [1/19/20]
      2005-12-02 00:23:54,222 TRACE [JmsSession] new JmsSession org.jboss.resource.adapter.jms.JmsSession@911fb5 mc=org.jboss.resource.adapter.jms.JmsManagedConnection@c21d01 cri=org.jboss.resource.adapter.jms.JmsConnectionRequestInfo@4155c62c
      2005-12-02 00:23:54,222 TRACE [CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.NoTxConnectionManager@16a93b8, connection : org.jboss.resource.adapter.jms.JmsSession@911fb5, key: null
      2005-12-02 00:23:54,222 TRACE [JmsSessionFactoryImpl] Allocated org.jboss.resource.adapter.jms.JmsSessionFactoryImpl@157566d session=org.jboss.resource.adapter.jms.JmsSession@911fb5
      2005-12-02 00:23:54,222 DEBUG [JmsClient] after creating queueSession
      2005-12-02 00:23:54,222 TRACE [JmsSession] getSession com.tibco.tibjms.TibjmsQueueSession@1a2f9dd for org.jboss.resource.adapter.jms.JmsSession@911fb5
      2005-12-02 00:23:54,222 TRACE [JmsSession] createQueue com.tibco.tibjms.TibjmsQueueSession@1a2f9dd queueName=queue.secmgr.reply
      2005-12-02 00:23:54,222 TRACE [JmsSession] createdQueue com.tibco.tibjms.TibjmsQueueSession@1a2f9dd queue=Queue[queue.secmgr.reply]
      2005-12-02 00:23:54,222 TRACE [JmsSession] getSession com.tibco.tibjms.TibjmsQueueSession@1a2f9dd for org.jboss.resource.adapter.jms.JmsSession@911fb5
      2005-12-02 00:23:54,222 TRACE [JmsSession] createConsumer com.tibco.tibjms.TibjmsQueueSession@1a2f9dd dest=Queue[queue.secmgr.reply]
      2005-12-02 00:23:54,222 TRACE [JmsMessageConsumer] new JmsMessageConsumer org.jboss.resource.adapter.jms.JmsMessageConsumer@1a7d9e7 consumer=QueueReceiver[queue=queue.secmgr.reply] session=org.jboss.resource.adapter.jms.JmsSession@911fb5
      2005-12-02 00:23:54,222 TRACE [JmsSession] createdConsumer com.tibco.tibjms.TibjmsQueueSession@1a2f9dd consumer=org.jboss.resource.adapter.jms.JmsMessageConsumer@1a7d9e7
      2005-12-02 00:23:54,222 DEBUG [JmsClient] Now trying to get a message from queue.secmgr.reply
      2005-12-02 00:23:54,222 TRACE [JmsMessageConsumer] receive org.jboss.resource.adapter.jms.JmsMessageConsumer@1a7d9e7 timeout=0
      ------------------------------------


      I am using a timeout of 0. MessageConsumer.receive(0). The client just hangs forever.


      I can send more detailed log files or other configuration files if necessary.

      Thanks for your help.

      Regards
      Mandar


        • 1. Re: JBoss 4.0.2 and Tibco Integration question
          mandar Newbie

          Hi,
          Found the reason for not being able to receive. I was NOT calling connection.start() before creating the consumer.

          I have one more issue.

          Our EMS server has security enabled and different queues have different user ids and passwords. The examples that I see on the forums would work if all connections from jboss share the same credentials. How can I use different userid/passwords when I connect to EMS server ?

          I tried to use createConnection(userName,password) but the security set up in the Realm gets picked up.

          I tried to use <application-managed-security/>. However in this case Jboss is not able to connect (lookup fails) and therefore I had to switch back to <security-domain-and-application>

          Any help would be appreciated.

          Thanks
          Mandar





          • 2. Re: JBoss 4.0.2 and Tibco Integration question
            Elias Ross Master


            Probably your security questions were covered in many many threads. See if you can use Search.

            • 3. Re: JBoss 4.0.2 and Tibco Integration question
              mandar Newbie

              Genman,
              Thanks for your reply.

              After reviewing the forums, I was able to configure tibco integration except for the security part as mentioned in my previous post.

              Here is what I tried and it does not work.

              Set up a jboss realm in login-config.xml with ems user id as 'jbosslookup'. I guess that jboss uses this userid to set up the pool. Jboss server is able to create the pool on startup.

              When I create the connection, if I pass some other valid ems user id 'myuser' using createConnection('myuser','password'). it fails and I get an exception in the log.

              I think either the jboss server or the ems server is unable to switch between users.

              That is the reason I seeked help because I think the answer lies in how the jboss jms adapter implementation switches users if the caller passes userid at runtime.

              I read in one of the forums that jboss jca security always uses the user from login-xml file and that setting takes precedence over the actual userid passed at the time a connection is created.

              Is this true ?

              If yes, is there any other way I can pass different userid/passwords when I create jms connection (createConnection call) ? May be using some other login modules etc.

              Also, if I use <application-managed-security/> , how can I set up the connection pool because the pool will not be linked with any security realm and our ems server is secure.

              Thanks in advance for your help.

              Regards
              Mandar




              • 4. Re: JBoss 4.0.2 and Tibco Integration question
                Nehru Dinakaran Newbie

                i am not able to connect ems with jboss 4.0.2 and i'm using tibco jms i follow the steps all in the tiboc intgaration guide but still i'm not able to connect