6 Replies Latest reply on Mar 15, 2010 3:55 PM by sunil_patel

    Sending message to JBOSS queue from WebSphere

    sunil_patel

      Hello

       

      I am trying to send a message to JBOSS (soa-p.5.0.0) queue from WebSphere 6. I followed these steps:
      1. Create a queue in JBOSS.
      2. Create a JMS providers (JBoss Messaging Provider) in WebSphere.
      3. Created a Queue connection factories.
      4. Created a queue with external jndi name same as provided in step 1.
      5. Wrote a servlet to test this. It has similar code as SendJMSMessage in HelloWorld quickstarts.

       

      It is throwing
      javax.jms.IllegalStateException: Isn't an XASession
      at org.jboss.jms.client.JBossSession.getSession(JBossSession.java:381)

       

      Does anyone have an idea what I am doing wrong?

       

      Thanks

      Hitesh

        • 1. Re: Sending message to JBOSS queue from WebSphere
          gaohoward

          How did you create the queue connection? I guess you need to create a XAConnection.

          • 2. Re: Sending message to JBOSS queue from WebSphere
            sunil_patel

            Thanks for your time. I tried but got:

            ClassCastException : com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle incompatible with javax.jms.XAQueueConnectionFactory

            It does not make sense because quickstart HelloWorld works with the same code outside of WebSphere and JBOSS Developer Studio.

            • 3. Re: Sending message to JBOSS queue from WebSphere

              Hi...

               

                   I also need to do almost the same thing...if u could share the steps to be followed to send messages from websphere(not MQ) messaging queue to JBoss messaging queues...it will be of great help..thank u so much...

              • 4. Re: Sending message to JBOSS queue from WebSphere
                sunil_patel

                Here are the steps I followed (WebSphere needs some fix,  so it will not work, not with 6.1 at least):

                 

                1. Created a queue in JBOSS server. Tested the queue successfully from command prompt and from within RAD by running a java program with following jar files provided by JBOSS.

                jboss-remoting.jar

                jboss-messaging-client.jar

                jbossall-client.jar

                jboss-aop.jar

                javassist.jar

                trove.jar

                log4j.jar

                 

                2. Created a JMS provider (JBOSS Messaging Provider) in local WebSphere with Admin Console. Added all jar files mentioned in step 1 in the classpath for the provider.

                 

                3. Created a Queue connection factory in local WebSphere with Admin Console.

                 

                4. Created a queue (with external jndi name same as provided in step 1) in local WebSphere with Admin Console.

                 

                5. Wrote a servlet to test this by sending a message in local WebSphere with Admin Console.

                 

                6. Ran the servlet. Connection is successful but get exception "javax.jms.IllegalStateException: Isn't an XASession" while trying to create sender.

                 

                • 5. Re: Sending message to JBOSS queue from WebSphere
                  Thanks for the help... will ask you if i have any doubts in doing this....
                  • 6. Re: Sending message to JBOSS queue from WebSphere
                    sunil_patel
                    Anyone interested in using this can use XA transactions for sending message to JBOSS queue. That works for us unless we have another Fix pack from WebSphere/JBOSS.