1 2 Previous Next 15 Replies Latest reply on Sep 5, 2003 3:32 PM by tslusser

    Foreign JMS with JBoss 3.2.1

    tslusser

      Hello,

      I have searched the newsgroups and have read the threads regarding integrating a foreign JMS server with JBoss in order to process messages with MDBs. However I am still having problems.

      Here is what I have done..

      1) Bind QueueConnectionFactory and TopicConnectionFactory of 3rd party JMS server to JBoss jndi. I have also bound the Queues from the 3rd party JMS server to JBoss jndi. I can send/receive from simple client with no problems.

      2) Configure jms-service.xml to use my QueueConnectionFactory and TopicConnectionFactory created in step 1. (Is there a difference between jms-ds.xml and jms-service.xml? I renamed jms-ds.xml to jms-service.xml and moved from deploy/jms dir to deploy)

      3) I have an mdb which works when using JbossMQ.

      Everything deploys without errors but when I send a message to the 3rd party queue it is not consumed by the mdb.

      Any suggestions would be greatly appreciated.

      Thanks,

      Ted

        • 1. Re: Foreign JMS with JBoss 3.2.1

          How do you know it is connecting the remote JMS.

          Try stopping the remote JMS, does the MDB go into "reconnect" loop.

          Regards,
          Adrian

          • 2. Re: Foreign JMS with JBoss 3.2.1
            tslusser

            Hi Adrian,

            I can view the attached queue receivers using JMS management console. It does not show any receivers attached to the queue defined in jboss.xml for the mdb.

            I'm not sure how to tell if the MDB is in reconnect loop?

            Thanks,
            Ted

            • 3. Re: Foreign JMS with JBoss 3.2.1

              There will be a message on the console saying trying
              to reconnect.

              Regards,
              Adrian

              • 4. Re: Foreign JMS with JBoss 3.2.1
                tslusser

                There is no message on the console regarding mdb trying to reconnect to the queue.

                I have verified that the QueueConnectionFactory is being loaded and the createQueueConnection method on the factory is being called. But for some reason it does not connect to the external JMS queue.

                Do I need to do anything with AbstractJMSProviderAdapter? I have looked at JBossMQProvider but it seems to only be setting up jndi properties. I am binding all of my stuff to JBoss' jndi server so I am assuming that JBossMQProvider will work with my custom QueueConnectionFactory.

                Thanks,

                Ted

                • 5. Re: Foreign JMS with JBoss 3.2.1

                  Just been reading back through this list.

                  jms-ds.xml won't deploy correctly if you rename it to -service.xml
                  Unless you make the necessary changes.

                  I thought you were using a third-party JMS, why are you
                  looking at jbossmq for receivers?

                  You just need to provide the jndi names of the connection
                  factories.
                  If the jndi is on a remote jboss machine add
                  a ProviderUrl property.

                  Regards,
                  Adrian

                  • 6. Re: Foreign JMS with JBoss 3.2.1
                    tslusser

                    What changes do I need to make to jms-ds in order for it to deploy as jms-service?

                    I am using a third party JMS but I left the ProviderAdapterClass in jms-service as JBossMQProvider since it doesn't appear to have any JBossMQ specific functionality.

                    I think I have the jndi stuff working since it does get the QueueConnectionFactory properly.

                    Also I was reading the other topic about Fiorano and tried to enable debug for org.jboss.ejb & org.jboss.jms. I know this is a log4j question but can you tell me how to do this? I have the threshold set for INFO in log4j.xml for the file appender but I want it to log DEBUG for org.jboss.ejb & jms. I added entries under "Limit categories" but it isn't logging any debug messages.

                    Thanks for your help,

                    Ted

                    • 7. Re: Foreign JMS with JBoss 3.2.1

                      The -ds.xml is transformed using xsl
                      The -service.xml only accepts






                      If you have removed the non-s, just change
                      <connection-factories> to

                      Regards,
                      Adrian

                      • 8. Re: Foreign JMS with JBoss 3.2.1

                        You should also see an example for TRACE
                        just below. "org.jboss.ejb.plugins"
                        Just copy it out of the comment and change the name.
                        You'll need two.

                        Regards,
                        Adrian

                        • 9. Re: Foreign JMS with JBoss 3.2.1
                          tslusser

                          Hello,

                          In ejb-jar.xml for the tag

                          <message-driven-destination>
                          <destination-type>javax.jms.Queue
                          ...

                          If I have a value of javax.jms.Queue, upon deploying, the mdb will throw a class cast exception in the third party class at com.seebeyond.jms.client.STCQueueSession.setMessageListener()

                          If I have a value of the explicit Queue type (com.seebeyond.jms.client.STCQueue) it will deploy but it never creates the Connection from the ConnectionFactory. This is why it was never delivering the messages to the mdb.

                          Does this sounds like a bug in the 3rd party JMS implementation? Shouldn't I declare javax.jms.Queue as the destination-type?

                          Thanks,

                          Ted

                          • 10. Re: Foreign JMS with JBoss 3.2.1

                            It sounds like a misconfiguration somewhere.
                            The interface doesn't matter.
                            Can you confirm from the DEBUG messages that it is creating
                            a QueueConnection.
                            Is the queue specified in <destination-jndi-name> in jboss.xml
                            a queue that is valid for the target JMS?

                            Regards,
                            Adrian

                            • 11. Re: Foreign JMS with JBoss 3.2.1
                              tslusser

                              Yes. There is a DEBUG message regarding QueueConnection... (pls see attached file)

                              The queue in <destination-jndi-name> is valid as I can receive messages using a simple jms client like so...

                              Queue q = (Queue) context.lookup("queue/TestQueueOut");

                              • 12. Re: Foreign JMS with JBoss 3.2.1

                                Does the thirdparty JMS client jar include javax.jms classes?
                                My guess is they are getting loaded in preference to
                                the jboss-j2ee.jar versions causing the ClassCast

                                Regards,
                                Adrian

                                • 13. Re: Foreign JMS with JBoss 3.2.1

                                  But then the Object[] looks like an internal config problem
                                  in the foreign jms client.

                                  Regards,
                                  Adrian

                                  • 14. Re: Foreign JMS with JBoss 3.2.1
                                    tslusser

                                    Hi Adrian,

                                    I was able to hook up SonicMQ as an external message provider. Everything worked well. The only difference I could see is that Sonic provides with the integration kit I downloaded from their website a custom ServerSessionPoolLoader implementation.

                                    Perhaps I have to write one for my JMS provider...

                                    I looked at the classes and their are no javax.* classes in the third party jar files.

                                    Thanks,
                                    Ted

                                    1 2 Previous Next