Chapter 32. Java EE Examples Using the JMS API


32. Java EE Examples Using the JMS API

This chapter provides examples that show how to use the JMS API within a Java EE application in the following ways:

  • Using a session bean to send messages that are consumed by a message-driven bean using a message selector and a durable subscription

  • Using an application client to send messages that are consumed by two message-driven beans; the information from them is stored in a Java Persistence API entity

  • Using an application client to send messages that are consumed by a message-driven bean on a remote server

  • Using an application client to send messages that are consumed by message-driven beans on two different servers

The examples are in the following directory:

   <INSTALL>/javaeetutorial5/examples/jms/


To build and run the examples, you will do the following:

1.

Use NetBeans 5.5 or the Ant tool to compile and package the example.

2.

Use the Ant tool to create resources.

3.

Use NetBeans 5.5 or the Ant tool to deploy the example.

4.

Use NetBeans 5.5 or the Ant tool to run the client.

Each example has a build.xml file that refers to files in the following directory:

   <INSTALL>/javaeetutorial5/examples/bp-project/


See Chapter 23 for a simpler example of a Java EE application that uses the JMS API.



The JavaT EE 5 Tutorial
The JavaT EE 5 Tutorial
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 309

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net