background image

Deploying confirmer Using Ant

<< Creating a Mail Session | Further Information about Resources >>
<< Creating a Mail Session | Further Information about Resources >>

Deploying confirmer Using Ant

Building, Packaging, and Deploying confirmer Using Ant
To build and package the confirmer example, do the following:
1. In a terminal window, go to tut-install/examples/ejb/confirmer.
2. Enter the following command:
ant
This compiles the source code and creates an EAR file, confirmer.ear, in the dist
directory.
To deploy confirmer.ear, type the following command in a terminal window:
ant deploy
Running the confirmer Client in NetBeans IDE
By default, the client sends a message to pig.bodine@example.com, a fictional email address. To
change the email address in NetBeans IDE, do the following:
1. Right-click the confirmer project in the Projects pane and select Properties.
2. Click the Run category.
3. In the Client Information area, under Arguments, enter the email address to which you
want the message sent.
4. Click OK.
To run the client in NetBeans IDE, right-click the confirmer project in the Projects pane and
select Run Project. You should see the following line when the client has successfully sent the
test message:
...
Message sent to pig.bodine@example.com.
...
Running the confirmer Client Using Ant
By default, the client sends a message to pig.bodine@example.com, a fictional email address. To
change the email address, set the app-client.args property in
tut-install/examples/ejb/confirmer/nbproject/project.properties to the email address
to which you'd like the test message sent. For example:
app-client.args=duke@example.com
To retrieve the client JAR and run the client, enter the following command in a terminal:
ant run
The confirmer Example Application
Chapter 34 · Resource Connections
1017