JMS

Install JMS Example

JBoss JMS Example converted to Eclipse project.

  1. Click File, click Import..., click Existing Project into Workspace, click Next, click Browse..., navigate to C:\eclipse\workspace\jms, click Finish.
  2. Expand jms project in Eclipse.
  3. Right click on build.xml, click Run Ant..., check deploy-ear, deploy-hellolistener, delpoy-hellotopicmdb, deploy-topichello24 and click Finish.
  4. You do not need to run the Ant script again unless you change any of the classes.  This examples uses several Ant targets to build the same jar files.  See the JBoss documentation for more information.
  5. From My Computer navigate to %JBOSS_DIST%\server\default\conf, open jboss-service.xml in Wordpad, go to line with:
        <attribute name="URLs">
        ./deploy
        </attribute>


    Right after ./deploy add ,C:\eclipse\workspace\jms\jms.ear so it should look like:

        <attribute name="URLs">
        ./deploy,
        C:\eclipse\workspace\jms\jms.ear
        </attribute>
  6. Save changes and exit Wordpad.

Working with the JMS Example in Eclipse

  1. Run Eclipse, in Package Explorer you should see jms.
    bulletjms contains all the EJBs and clients for the CMP Example.  It uses one source folder src, has five packages org.jboss.docs.jms.client, org.jboss.docs.jms.mdb.bean, org.jboss.docs.jms.mdb.interfaces, org.jboss.docs.jms.ra.bean, org.jboss.docs.jms.ra.interfaces, which contain the EJB and client source, and an ant file build.xml to build the ear folder.
  2. Click JBoss, Start JBoss (if not already started) and wait for:

    10:33:48,077 INFO [Server] JBoss (MX MicroKernel) [3.0.1RC1 Date:200206291622] Started in 0m:12s:125ms

    in the Console output.  This means JBoss is up and running.
  3. Click Run, Run..., click on Java Application, click New, put HelloSubscriber25 in Name, click Browse... and select jms, click OK, click Search..., select HelloSubscriber25, click OK and click Run.  Wait for HelloSubscriber subscribed to topic: topic/testTopic.
  4. Click Run, Run..., click on Java Application, click New, put HelloPublisher25 in Name, click Browse... and select jms, click OK, click Search..., select HelloPublisher25, click OK and click Run.
  5. Switch to debug perspective, click on HelloSubscriber25 class in Debug window, you should see where it got the messages from HelloPublisher25.
Home | JBoss Examples Last updated on 08/07/2002