4 Replies Latest reply on Sep 20, 2004 10:55 AM by Cristian Botiza

    JMS implementation classes

    Cristian Botiza Newbie


      Hello.

      I wonder where are the JMS implementation classes in the JBoss distribution? I am using JBoss 3.2.5 and I have tried several JARs in the distribution: /client/jbossall-client.jar, /server/jboss-j2ee.jar. But it seems that only some interfaces are available for javax.jms, some of them with no methods.
      What can I do in order to write and compile JMS applications?

      Thank you

        • 1. Re: JMS implementation classes
          Tim Morrow Newbie

          The entire JMS specification consists of interfaces. Therefore, to write and compile a an application that makes use of the JMS api, you only need to add a JAR containing the interfaces to your classpath. The jboss-j2ee.jar contains all the JMS interfaces.

          The actual JBoss implementations of those interfaces are located in jbossmq.jar (for example org.jboss.mq.SpyQueueSession is an implementation of javax.jms.QueueSession). This Jar is required at runtime, not compile time.

          Tim

          • 2. Re: JMS implementation classes
            Cristian Botiza Newbie


            Thank you Tim, it seems you are write.

            Still, when I added jboss-j2ee.jar in IntelliJ IDEA's project configuration, it complains about having not found some methods, for example: ConnectionFactory.createConnection().

            What can I do?

            Thanks a lot

            • 3. Re: JMS implementation classes
              Tim Morrow Newbie

              That method is only available in JMS 1.1 which is only included with J2EE 1.4.

              JBoss 3.x supports J2EE 1.3, which includes the JMS 1.0.2 APIs. ConnectionFactory has no methods in that version.

              I'd suggest reviewing the J2EE 1.3 javax.jms API docs and make sure if you're following any tutorials that they are for the JMS 1.0.2 spec. The concepts are the same but the actual classes and methods you'll use are different.

              Alternatively, use something like Spring Framework's API helpers to insulate your code from many of the API details.

              Tim

              • 4. Re: JMS implementation classes
                Cristian Botiza Newbie


                Tim, I am now using JBoss4.0 and the included jboss-j2ee.jar file and everything goes well.

                Thank you very much