Java Reference
In-Depth Information
If you have run the simple JMS examples in Chapter 20 , Java Message Service Con-
cepts , ” and have not deleted the resources, you already have these resources. Otherwise,
the resources will be created automatically when you deploy the application.
For more information on creating JMS resources, see JMS Administered Objects for the
Synchronous Receive Example on page 381 .
To Run the simplemessage Application Using NetBeans IDE
1. From the File menu, choose Open Project.
2. In the Open Project dialog, navigate to:
tut-install /examples/ejb/
3. Select the simplemessage folder.
4. Select the Open as Main Project check box and the Open Required Projects
check box.
5. Click Open Project.
6. In the Projects tab, right-click the simplemessage project and choose
Build.
This task packages the application client and the message-driven bean, then creates
a file named simplemessage.ear in the dist directory.
7. Right-click the project and choose Run.
This command creates any needed resources, deploys the project, returns a JAR
file named simplemessageClient.jar , and then executes it.
The output of the application client in the Output pane looks like this (preceded by
application client container output):
Click here to view code image
Sending message: This is message 1
Sending message: This is message 2
Sending message: This is message 3
To see if the bean received the messages,
check <install_dir>/domains/domain1/logs/server.log.
The output from the message-driven bean appears in the server log ( domain-
dir /logs/server.log ), wrapped in logging information.
Search WWH ::




Custom Search