background image

Running the Secure Converter Example

<< confidentiality Element | Troubleshooting the Secure Converter Example >>
<< confidentiality Element | Troubleshooting the Secure Converter Example >>

Running the Secure Converter Example

Building, Deploying, and Running the Secure Converter Example Using
NetBeans IDE
Follow these instructions to build, package, and deploy the converter-secure example to your
Application Server instance using NetBeans 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 converter-secure 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 converter-secure project and select Clean and Build
Project.
7. In the Projects tab, right-click the converter-secure project and select Deploy Project.
This step builds and packages the application into converter-secure.ear, located in
tut-install/javaeetutorial5/examples/ejb/converter-secure/dist/, and deploys this
ear file to your Application Server instance.
8. To run the secure converter's application client, select Run
Run Main Project. You will be
prompted for your username and password.
9. Enter the username and password of a user that has been entered into the database of users
for the file realm and has been assigned to the group of user.
If the username and password you enter are authorized, you will see the output of the
application client in the Output pane:
[exec] $100.00 is 11531.00 Yen.
[exec] 11531.00 Yen is 81.88 Euro.
Building, Deploying, and Running the Secure Converter Example Using
Ant
To build the secure converter enterprise beans and client, package and deploy the enterprise
application, and run the client application, follow these steps:
1. Set up your system for running the tutorial examples if you haven't done so already by
following the instructions in
"Building the Examples" on page 70
.
2. From a terminal window or command prompt, go to the
tut-install/javaeetutorial5/examples/ejb/converter-secure/ directory.
3. Build, package, deploy, and run the enterprise application and application client by entering
the following at the terminal window or command prompt in the ejb/converter-secure/
directory:
ant all
Enterprise Bean Example Applications
The Java EE 5 Tutorial · September 2007
830