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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ant run<br />

Ignore the message that states that the application is deployed at a URL.<br />

<strong>The</strong> output in the terminal window looks like this:<br />

running application client container.<br />

Sending message: This is message 1<br />

Sending message: This is message 2<br />

Sending message: This is message 3<br />

To see if the bean received the messages,<br />

check /domains/domain1/logs/server.log.<br />

In the server log file, the following lines should be displayed, wrapped in logging information:<br />

MESSAGE BEAN: Message received: This is message 1<br />

MESSAGE BEAN: Message received: This is message 2<br />

MESSAGE BEAN: Message received: This is message 3<br />

<strong>The</strong> received messages often appear in a different order from the order in which they were sent.<br />

Undeploy the application after you finish running the client. Use the following command:<br />

ant undeploy<br />

To remove the generated files, use the following command:<br />

ant clean<br />

Removing the Administered Objects for the<br />

simplemessage Example<br />

After you run the example, you can use the following Ant targets to delete the connection<br />

factory and queue:<br />

ant delete-cf<br />

ant delete-queue<br />

Packaging, Deploying, and Running the simplemessage Example<br />

Chapter 23 • A Message-Driven Bean Example 679

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

Saved successfully!

Ooh no, something went wrong!