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.

Enterprise Bean Example Applications<br />

828<br />

Building, Deploying, and Running the Secure Converter Example Using<br />

Ant<br />

To build the secure converter enterprise beans and client, package and deploy the enterprise<br />

application, and run the client application, follow these steps:<br />

1. Set up your system for running the tutorial examples if you haven’t done so already by<br />

following the instructions in “Building the Examples” on page 69.<br />

2. From a terminal window or command prompt, go to the<br />

tut-install/javaeetutorial5/examples/ejb/converter-secure/ directory.<br />

3. Build, package, deploy, and run the enterprise application and application client by entering<br />

the following at the terminal window or command prompt in the ejb/converter-secure/<br />

directory:<br />

ant all<br />

Note – This step assumes that you have the executable for ant in your path; if not, you will<br />

need to provide the fully qualified path to the ant executable. This command runs the ant<br />

target named all in the build.xml file.<br />

<strong>The</strong> running application will look like this:<br />

appclient-command-common:<br />

At this point, a system login dialog will display. Enter the user name and password that<br />

correspond to a user in the group user on the Application Server. If the user name and password<br />

are authenticated, the following text displays in the terminal window or command prompt:<br />

appclient-command-common:<br />

[exec] $100.00 is 11531.00 Yen.<br />

[exec] 11531.00 Yen is 81.88 Euro.<br />

Troubleshooting the Secure Converter Application<br />

Problem: <strong>The</strong> application displays zero values after authentication, as shown here:<br />

appclient-command-common:<br />

[exec] $100.00 is 0.00 Yen.<br />

[exec] 0.00 Yen is 0.00 Euro.<br />

Solution: Verify that the user name and password that you entered for authentication match a<br />

user name and password in the Application Server, and that this user is assigned to the group<br />

named user. User names and passwords are case-sensitive. Read “Adding Users to the<br />

Application Server” on page 779 for more information on adding users to the file realm of the<br />

Application Server.<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!