This discussion is archived
3 Replies Latest reply: Feb 16, 2008 12:55 AM by 807601 RSS

Javax.jms

807601 Newbie
Currently Being Moderated
I want to use 'import javax.jms', do I have to have j2EE installed? I am currently using SE. What is the easiest way to add j2EE to my current SE installation? Thanks.
  • 1. Re: Javax.jms
    796254 Newbie
    Currently Being Moderated
    SizzlinJones wrote:
    I want to use 'import javax.jms', do I have to have j2EE installed?
    You have to have a JAR with that package in your CLASSPATH.

    You might be able to find it as part of an OpenJMS implementation, but the easiest way is to get it as part of a Java EE app server.
    I am currently using SE. What is the easiest way to add j2EE to my current SE installation? Thanks.
    You don't "add" Java EE to your SE installation. You install a Java EE app server and run it on top of your JDK. WebLogic, JBoss, Glassfish - all good candidates. Look for OpenJMS or Google for "jms" if you want to use Spring and Tomcat.

    %
  • 2. Re: Javax.jms
    807601 Newbie
    Currently Being Moderated
    I have downloaded ActiveMQ and I want to use it to write a messaging service. Is it a replacement for the technologies you stated above? I have added the JAR files/Folder to my project. What else do I need to do?
  • 3. Re: Javax.jms
    807601 Newbie
    Currently Being Moderated
    SizzlinJones wrote:
    I have downloaded ActiveMQ and I want to use it to write a messaging service. Is it a replacement for the technologies you stated above? I have added the JAR files/Folder to my project. What else do I need to do?
    It's an implementation of part of those technologies. If you want to play around with JMS, but don't want to use an EJB container, there are a few fairly straightforward ways to do it. Jencks is a pretty straightforward way to work with JMS, and Spring 2 will come in very handy. Also, there's Apache Camel, which is part of the ActiveMQ family anyway, and works with it very well. Try the following links, and also google for "message-driven POJO". Be warned that you're probably biting off more than you can chew at the moment. You're not going to be able to just create an instance of some class, call a method or two on it and have messages magically appear somewhere else. Setting up message brokers is a pain in the @ss

    http://jencks.codehaus.org/
    http://activemq.apache.org/camel/
    http://www.springframework.org