FileDocCategorySizeDatePackage
ProfileBean.javaAPI DocExample2530Wed Apr 05 11:25:42 BST 2000stateful

ProfileBean

public class ProfileBean extends Object implements SessionBean
A ProfileBean, which provides enterprise profile information for a named person.

Fields Summary
private String
mName
private Properties
mEntries
private SessionContext
mContext
Constructors Summary
Methods Summary
public voidejbActivate()
No need for us to activate anything in this bean, but we need to provide an implementation.

  
  // Session bean methods

                      
     
    System.out.println("ProfileBean activated.");
  
public voidejbCreate()
Create method (corresponds to each create() method on the home interface, ProfileHome). Nothing to initialize in this case.

    System.out.println("Nameless ProfileBean created.");
  
public voidejbCreate(java.lang.String name)
Create method with name of profile owner.

    mName = name;
    System.out.println("ProfileBean created for " + mName + ".");
  
public voidejbPassivate()
No resources to release on passivation...

    System.out.println("ProfileBean passivated.");
  
public voidejbRemove()
Nothing to do on a remove.

    System.out.println("ProfileBean removed.");
  
public java.lang.StringgetEntry(java.lang.String key)

    return mEntries.getProperty(key);
  
public java.lang.StringgetName()

    return mName;
  
public voidsetEntry(java.lang.String key, java.lang.String value)

    mEntries.put(key, value);
  
public voidsetName(java.lang.String name)

    mName = name;
  
public voidsetSessionContext(SessionContext context)
Get context from container.

    System.out.println("ProfileBean context set.");
    mContext = context;