10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

An Application ExampleThat Deploys a Message-Driven Bean onTwo Servers<br />

984<br />

ReplyMsgBean: Received message: text: id=8 to remote app server<br />

ReplyMsgBean: Received message: text: id=10 to remote app server<br />

Undeploy the modules after you finish running the client. To undeploy the modules, perform<br />

these steps:<br />

1. Click the Services tab.<br />

2. Expand the Servers node.<br />

3. Expand the Application Server node (the local system).<br />

4. Expand the Applications node.<br />

5. Expand the EJB Modules node.<br />

6. Right-click replybean and choose Undeploy.<br />

7. Expand the App Client Modules node.<br />

8. Right-click multiclient and choose Undeploy.<br />

9. Expand the node for the remote system.<br />

10. Expand the Applications node.<br />

11. Expand the EJB Modules node.<br />

12. Right-click replybean and choose Undeploy.<br />

To remove the generated files, follow these steps:<br />

1. Right-click the replybean project and choose Clean.<br />

2. Right-click the multiclient project and choose Clean.<br />

Building, Deploying, and Running the sendremote<br />

Modules Using Ant<br />

To package the modules, perform these steps:<br />

1. Go to the following directory:<br />

tut-install/javaeetutorial5/examples/jms/sendremote/multiclient/<br />

2. Type the following command:<br />

ant<br />

This command creates a JAR file that contains the client class file and a manifest file.<br />

3. Change to the directory replybean:<br />

cd ../replybean<br />

4. Type the following command:<br />

ant<br />

This command creates a JAR file that contains the bean class file.<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!