Creating the Administered Objects
Creating the Administered Objects
Creating the Administered Objects for the
simplemessage
Example
This example requires the following:
A JMS connection factory resource
A JMS destination resource
If you have run the simple JMS examples in
and
have not deleted the resources, you already have these resources and do not need to perform
these steps.
You can use Ant targets to create the resources. The Ant targets, which are defined in the
build.xml
file for this example, use the asadmin command. To create the resources needed for
this example, use the following commands:
ant create-cf
ant create-queue
These commands do the following:
Create a connection factory resource named jms/ConnectionFactory
Create a destination resource named jms/Queue
The Ant targets for these commands refer to other targets that are defined in the
tut-install/javaeetutorial5/examples/bp-project/app-server-ant.xml file.
Building, Deploying, and Running the simplemessage
Application Using NetBeans IDE
To build, deploy, and run the application using NetBeans IDE, do the following:
1. In NetBeans IDE, choose Open Project from the File menu.
2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/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 Folder.
6. Right-click the simplemessage project and choose Build Project.
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 Deploy Project.
8. Right-click the project and choose Run Project.
Packaging, Deploying, and Running the simplemessage Example
Chapter 23 · A Message-Driven Bean Example
679