ibm.com/developerWorks
Presented by developerWorks, your source for great tutorials
/* Create the users  Rick and Nick */
UserManagement userMgmt = home.create();
userMgmt.addUser("rick@rickhightower.com", "mypassword");
userMgmt.addUser("nick@rickhightower.com", "oxford");
/* Verify Rick s Password */
boolean login = false;
login = userMgmt.verifyPassword("rick@rickhightower.com",
"mypassword");
System.out.println("Login =" + login);
/* Remove the users  Rick and Nick */
userMgmt.removeUser("rick@rickhightower.com");
userMgmt.removeUser("nick@rickhightower.com");
} catch (Exception e) {
System.err.println("MESSAGE:" + e.getMessage());
e.printStackTrace(System.err);
}
}
}
Listing 8: The
UserManagement
Client deployment descriptor
J2EE Application Client 1.3//EN 
 http://java.sun.com/dtd/application client_1_3.dtd >
Section2Client
ejb/UserManagement
Session
com.rickhightower.auth.UserManagementHome
com.rickhightower.auth.UserManagement
In addition, if you want the
.jar
file that contains the client to be executable, then you
have to specify client s class file name as the main class of the
.jar
file in the manifest
file (
MANIFEST.MF
) as follows:
Manifest Version: 1.0
Main Class: com.rickhightower.client.Section2Client
Page 30 of 48
Introducing EJB CMP/CMR, Part 1 of 2






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