Writing the Application Components
Writing the Application Components
Writing the Application Components for the
clientmdbentity
Example
Writing the components of the application involves the following:
Coding the Application Client: HumanResourceClient.java
The application client program,
clientmdbentity-app-client/src/java/HumanResourceClient.java
, performs the
following steps:
1. Injects ConnectionFactory and Topic resources
2. Creates a TemporaryQueue to receive notification of processing that occurs, based on
new-hire events it has published
OfficeMDB
NewHire
Topic
ReplyQueue
Message Passing
HR
Client
SetupOffice
Entity
Method Invocation
M1
M1
M1
M2
M2
Finds
Creates and
Persists
Java EE Server
EquipmentMDB
FIGURE 322
A Java EE Application: Client to Message-Driven Beans to Entity
A Java EE Application That Uses the JMS API with an Entity
The Java EE 5 Tutorial · September 2007
972