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.

<strong>The</strong> confirmer Example Application<br />

1008<br />

3. Deploy the example.<br />

4. Retrieve the client JAR.<br />

5. Run the client JAR.<br />

Creating a Mail Session<br />

To create a mail session in the Application Server using the Admin Console, follow these steps:<br />

1. Open the URL http://localhost:4848/asadmin in a browser.<br />

2. Select the <strong>Java</strong>Mail Sessions node.<br />

3. Click New.<br />

4. Type mail/myMailSession in the JNDI Name field.<br />

5. Type the name of the host running your mail server in the Mail Host field.<br />

6. Type the destination email address in the Default User field.<br />

7. Type your email address in the Default Return Address field.<br />

8. Click OK.<br />

Note that mail/myMailSession is listed under the <strong>Java</strong>Mail Sessions node.<br />

Building, Packaging, and Deploying confirmer in NetBeans IDE<br />

Follow these instructions to build, package, and deploy the confirmer example to your<br />

Application Server instance using NetBeans IDE.<br />

1. In NetBeans IDE, select File→Open Project.<br />

2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/ejb/.<br />

3. Select the confirmer folder.<br />

4. Select the Open as Main Project and Open Required Projects check boxes.<br />

5. Click Open Project.<br />

6. In the Projects tab, right-click the confirmer project and select Undeploy and Deploy.<br />

This builds and packages the application into confirmer.ear, located in<br />

tut-install/javaeetutorial5/examples/ejb/confirmer/dist, and deploys this EAR file to<br />

your Application Server instance.<br />

Building, Packaging, and Deploying confirmer Using Ant<br />

To build and package the confirmer example, do the following:<br />

1. In a terminal window, go to tut-install/examples/ejb/confirmer.<br />

2. Enter the following command:<br />

ant<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!