Java Reference
In-Depth Information
This first example divides the example in Chapter 11 , A Message-Driven Bean
Example , ” into two modules: one containing the application client, and the other contain-
ing the message-driven bean.
You will find the source files for this section in the tut-install /examples/jms/con-
sumeremote/ directory. Path names in this section are relative to this directory.
Overview of the consumeremote Example Modules
This example is very similar to the one in Chapter 11 , “ A Message-Driven Bean
Example , ” except for the fact that it is packaged as two separate modules:
• One module contains the application client, which runs on the remote system and
sends three messages to a queue.
• The other module contains the message-driven bean, which is deployed on the loc-
al server and consumes the messages from the queue on the remote server.
The basic steps of the modules are as follows:
1. The administrator starts two Java EE servers, one on each system.
2. On the local server, the administrator deploys the message-driven bean module,
which specifies the remote server where the client is deployed.
3. On the remote server, the administrator places the client JAR file.
4. The client module sends three messages to a queue.
5. The message-driven bean consumes the messages.
Figure 21-5 illustrates the structure of this application. You can see that it is almost
identical to Figure 11-1 except that there are two Java EE servers. The queue used is the
one on the remote server; the queue must also exist on the local server for resource injec-
tion to succeed.
Search WWH ::




Custom Search