ibm.com/developerWorks
Presented by developerWorks, your source for great tutorials
member variable. The session bean looks up the entity bean during creation and
activation in the
ejbCreate()
and ejbActivate methods as follows:
package com.rickhightower.auth;
public class UserManagementBean implements SessionBean {
private
LocalUserHome userHome = null;
public void ejbCreate() throws CreateException {
try {
userHome = getUserHome();
} catch (NamingException e) {
throw new CreateWrapperException(
"Unable to find local user home in ejbCreate", e);
}
}
public void ejbActivate() {
try {
userHome = getUserHome();
} catch (NamingException e) {
throw new EJBException(
"Unable to find local user home in Activate", e);
}
}
}
Thus the home interface is always available to the business methods of the session
bean.
UserManagementBean
business methods in remote
interface
The business methods of the
UserManagementBean
are defined succinctly in the
remote interface of the
UserManagementBean
as follows:
package com.rickhightower.auth;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface UserManagement extends EJBObject {
Page 22 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