background image

Creating a Mail Session

<< Running the confirmer Example | Deploying confirmer Using Ant >>
<< Running the confirmer Example | Deploying confirmer Using Ant >>

Creating a Mail Session

3. Deploy the example.
4. Retrieve the client JAR.
5. Run the client JAR.
Creating a Mail Session
1. To create a mail session in the Application Server using the Admin Console, follow these
steps:Open the URL http://localhost:4848/asadmin in a browser.
2. Select the JavaMail Sessions node.
3. Click New.
4. Type mail/myMailSession in the JNDI Name field.
5. Type the name of the host running your mail server in the Mail Host field.
6. Type the destination email address in the Default User field.
7. Type your email address in the Default Return Address field.
8. Click OK.
Note that mail/myMailSession is listed under the JavaMail Sessions node.
Building, Packaging, and Deploying confirmer in NetBeans IDE
Follow these instructions to build, package, and deploy the confirmer example to your
Application Server instance using the NetBeans IDE IDE.
1. In NetBeans IDE, select File
Open Project.
2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/ejb/.
3. Select the confirmer folder.
4. Select the Open as Main Project and Open Required Projects check boxes.
5. Click Open Project Folder.
6. In the Projects tab, right-click the confirmer project and select Deploy Project.
This builds and packages the application into confirmer.ear, located in
tut-install/javaeetutorial5/examples/ejb/confirmer/dist, and deploys this EAR file to
your Application Server instance.
The confirmer Example Application
The Java EE 5 Tutorial · September 2007
1016