8 Replies Latest reply on Apr 14, 2005 2:08 PM by disrael

    Using JBoss jms-ra.rar in another application server

    disrael

      See original thread at:

      http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3870289#3872657

      I have the activemq-ra-2.1.rar working as a JMS resource in a SIP application server and would like to replace it with JBoss JMS. Currently the jms-ra.rar is not a self contained rar like ActiveMQ (see original post). Has anyone published a modified rar that works as an independent resource? Any ideas on doing this beyond what narayanrm suggests?

      Thank you for your help.

        • 1. Re: Using JBoss jms-ra.rar in another application server

          There is no jbossmq.rar

          jms-ra.rar is a generic rar for deploying *ANY* jms implementation into JBossAS

          If you want to make it into a generic rar for *ANY* jms implemenation into *ANY* Application Sever, you would need to remove the dependencies on JBoss/JCA,
          like that JBossResourceException.

          You would also need to replace the usage of the jms provider adapter
          from org.jboss.jms in the server module and replace it with some JCA1.5 admin objects
          for whichever jms provider you want to integrate.

          • 2. Re: Using JBoss jms-ra.rar in another application server
            disrael

            Thanks for clearing up some of my confusion. What I am looking for is a jbossmq.rar then. I want to integrate JBoss JMS implementation into the SIP application server using JCA. As you pointed out I don't think jms-ra.rar is relevant to this task.

            With the activemq-ra-2.1.rar I just used JCA to load it into the SIP application server and configured the URL to point at an ActiveMQ server instance. I was hoping for an equivalent JBoss rar because our tests showed JBoss was more reliable than ActiveMQ.

            Any road map for such a JBoss JMS rar? Any thoughts on how hard it would be for me to create one?

            Thank you very much for replying so quickly.

            • 3. Re: Using JBoss jms-ra.rar in another application server
              disrael

              I guess I could follow your directions and modify jms-ra.rar to incorporate JBoss JMS. Still interested in a road map though.

              Thank you.

              • 4. Re: Using JBoss jms-ra.rar in another application server

                Raise a feature request in JIRA or even better provide a patch.

                • 5. Re: Using JBoss jms-ra.rar in another application server
                  disrael

                  I have a JBossMQ.rar that I built out of jms-ra.rar but it is just a thin wrapper around jbossmq-client.jar. Since you are redoing JBossMQ anyway I will raise a feature request for the new development to keep JCA in mind.

                  Thanks again.

                  • 6. Re: Using JBoss jms-ra.rar in another application server
                    disrael

                    I'm having problems with multiple class loaders:

                    Properties environment = new Properties();
                    environment.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
                    environment.put("java.naming.provider.url", jnpUrl);
                    environment.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
                    NamingContextFactory contextFactory = new NamingContextFactory();
                    NamingContext jndiContext = (NamingContext) contextFactory.getInitialContext(environment);
                    Object o = jndiContext.lookup("ConnectionFactory");


                    When this code runs within my resource loader it does not use Thread.currentThread().getContextClassLoader() to find the supporting classes it needs. So even though jboss-common-client.jar and jbossmq-client.jar are in the rar file it cannot access it. Is there a way around this problem?

                    Thank you,
                    David

                    • 7. Re: Using JBoss jms-ra.rar in another application server

                      Moderated: You should ask your application server provider.

                      • 8. Re: Using JBoss jms-ra.rar in another application server
                        disrael

                        Just a warning for others attempting to follow this path for creating a JBossMQ.rar. The jms-ra.rar code's ManagedConnection.getConnection returns a session object!