| |
Install JMS Example
JBoss JMS Example
converted to Eclipse project.
- Click File, click Import..., click Existing Project into Workspace, click
Next, click Browse..., navigate to C:\eclipse\workspace\jms, click Finish.
- Expand jms project in Eclipse.
- Right click on build.xml, click Run Ant..., check deploy-ear, deploy-hellolistener,
delpoy-hellotopicmdb, deploy-topichello24 and click Finish.
- 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.
- 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>
Save changes and exit Wordpad.
Working with the JMS Example in Eclipse
- Run Eclipse, in Package Explorer you should see jms.
 | jms 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. |
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.
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.
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.
Switch to debug perspective, click on HelloSubscriber25 class in Debug
window, you should see where it got the messages from HelloPublisher25.
|