Java Reference
In-Depth Information
b. In the Open Project dialog, navigate to:
tut-install
/examples/jms/
c. Select the
clientsessionmdb
folder.
d. Select the Open as Main Project check box and the Open Required Pro-
jects check box.
e. Click Open Project.
f. In the Projects tab, right-click the
clientsessionmdb
project and select
Build.
This task creates the following:
• An application client JAR file that contains the client class file and the session
bean's remote interface, along with a manifest file that specifies the main
class and places the EJB JAR file in its classpath
• An EJB JAR file that contains both the session bean and the message-driven
bean
• An application EAR file that contains the two JAR files
2. Right-click the project and select Run.
This command creates any needed resources, deploys the project, returns a JAR
file named
clientsessionmdbClient.jar
, and then executes it.
The output of the application client in the Output pane looks like this (preceded by
application client container output):
To view the bean output,
check <install_dir>/domains/domain1/logs/server.log.
The output from the enterprise beans appears in the server log (
domain-
dir
/logs/server.log
), wrapped in logging information. The Publisher ses-
sion bean sends two sets of 18 messages numbered 0 through 17. Because of
the message selector, the message-driven bean receives only the messages whose
NewsType
property is
Sports
or
Opinion
.
To Run the
clientsessionmdb
Example Using Ant
1. Go to the following directory:
tut-install
/examples/jms/clientsessionmdb/