Presented by developerWorks, your source for great tutorials
ibm.com/developerWorks
runclient  client app.ear  name Section2Client textauth
The default username and password for the reference implementation clients is
guest
and
guest123
respectively. The session client output would look like the following:
C:\cmp cmr\section2\final>runclient  client app.ear  name Section2Client  textauth
Initiating login ...
Username = null
Enter Username:guest
Enter Password:guest123
Binding name: java:comp/env/ejb/UserManagement 
class type com.rickhightower.auth._UserManagementHome_Stub
Login =true
Unbinding name: java:comp/env/ejb/UserManagement 
Details on Ant build script
For completeness, the Ant build script is included below. If you have not interest in this
topic, you can safely skip this panel and go on with the rest of the tutorial without
skipping a beat.
Note from the Author
I found it quite necessary to create an Ant build script as I wanted to incrementally add
complexity to the application. At first, I tried to to use just the
deploytool
. But I found
after each change that I had to repeat a 50 step process to redeploy the application. I
also figured that after each step the reader would have to repeat the same 50 step
process. Thus I created an Ant build script to automate the task of building the example
into an
.ear
file. The key to make this work was to put the files that the
deploytool
created back into the META INF directories of the various subcomponents. Note 50
steps may seem like a slight exaggeration, and maybe it is, but even 12 steps executed
in order is very time consuming and error prone.
Read the description elements of the Ant build script to get an idea of what it is doing.
Since the Ant build script is in simple XML and you already get the gist of what it is
doing the build script is somewhat easy to follow.
Listing 9: The Ant build script
Introducing EJB CMP/CMR, Part 1 of 2
Page 37 of 48






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

tomcat web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved