Methods Summary |
---|
public void | ejbActivate()No need for us to activate anything in this bean, but we need to
provide an implementation.
// Session bean methods
System.out.println("ProfileServerBean activated.");
|
public void | ejbCreate()Create method(s) (corresponds to each create() method on the
home interface, ProfileServerHome. Nothing to initialize in this case.
System.out.println("ProfileServerBean created.");
|
public void | ejbPassivate()No state to store on passivation.
System.out.println("ProfileServerBean passivated.");
|
public void | ejbRemove()Nothing to do on a remove.
System.out.println("ProfileServerBean removed.");
|
public Profile | getProfile(java.lang.String name)Get a profile for a named person. Throws NoSuchPersonException if the
named person cannot be found in the database(s) used to retrieve
profile information.
// Here, we just create a ProfileImpl and return it. The EJB/RMI
// internals will return a remote stub for the object to the remote client,
// and the profile object will live on this end.
ProfileImpl profile = null;
try {
profile = new ProfileImpl(name);
}
catch (RemoteException re) {
System.out.println("Failed creating profile for " + name);
re.printStackTrace();
throw new NoSuchPersonException();
}
return profile;
|
public void | setSessionContext(SessionContext context)Get context from container.
System.out.println("ProfileServerBean context set.");
mContext = context;
|