com.ibm.websphere.samples.activitysessions.ASContainerManagedEJB
Class ASContainerManagedEJBBean

java.lang.Object
  extended by com.ibm.websphere.samples.activitysessions.ASContainerManagedEJB.ASContainerManagedEJBBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.EntityBean

public abstract class ASContainerManagedEJBBean
extends java.lang.Object
implements javax.ejb.EntityBean

The ASContainerManagedEJB CMP EJB Bean implements the EntityBean interface. It contains two instance variables that are both of type int. These are index, which is the key value for the EJB, and value.

Points to note about it's deployment are as follows

See Also:
Serialized Form

Constructor Summary
ASContainerManagedEJBBean()
           
 
Method Summary
 void ejbActivate()
          This required callback method is used for lifecycle notification.
 ASContainerManagedEJBKey ejbCreate(int argIndex)
          This Home Interface Method is responsible for creation.
 void ejbLoad()
          Required callback method for Contaimer Managed Persistence.
 void ejbPassivate()
          This required callback method is used for lifecycle notification.
 void ejbPostCreate(int index)
          ejbPostCreate
 void ejbRemove()
          Required callback method for Contaimer Managed Persistence.
 void ejbStore()
          Required callback method for Contaimer Managed Persistence.
 javax.ejb.EntityContext getEntityContext()
          getEntityContext
 int getHitCount()
          Getter method for hitCount
abstract  int getIndex()
          Getter method for index
abstract  int getValue()
          Getter method for value
 void incrementHitCount()
          Increment hit count
 void setEntityContext(javax.ejb.EntityContext ctx)
          This required callback method sets the entity context attribute for this EntityBean
abstract  void setIndex(int newIndex)
          Setter method for value
abstract  void setValue(int newValue)
          Setter method for value
 void unsetEntityContext()
          This is a required callback method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASContainerManagedEJBBean

public ASContainerManagedEJBBean()
Method Detail

getIndex

public abstract int getIndex()
Getter method for index

Returns:
int

setIndex

public abstract void setIndex(int newIndex)
Setter method for value

Parameters:
newIndex - int

getValue

public abstract int getValue()
Getter method for value

Returns:
int

setValue

public abstract void setValue(int newValue)
Setter method for value

Parameters:
newValue - int

getHitCount

public int getHitCount()
Getter method for hitCount

Returns:
int

incrementHitCount

public void incrementHitCount()
Increment hit count


ejbCreate

public ASContainerManagedEJBKey ejbCreate(int argIndex)
                                   throws javax.ejb.CreateException
This Home Interface Method is responsible for creation. It sets the index attribute to the value passed in.

Parameters:
argIndex - int
Throws:
javax.ejb.CreateException - The exception description.

ejbPostCreate

public void ejbPostCreate(int index)
                   throws javax.ejb.CreateException
ejbPostCreate

Throws:
javax.ejb.CreateException

ejbLoad

public void ejbLoad()
Required callback method for Contaimer Managed Persistence.

Specified by:
ejbLoad in interface javax.ejb.EntityBean

ejbRemove

public void ejbRemove()
Required callback method for Contaimer Managed Persistence.

Specified by:
ejbRemove in interface javax.ejb.EntityBean

ejbStore

public void ejbStore()
Required callback method for Contaimer Managed Persistence.

Specified by:
ejbStore in interface javax.ejb.EntityBean

getEntityContext

public javax.ejb.EntityContext getEntityContext()
getEntityContext


setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
This required callback method sets the entity context attribute for this EntityBean

Specified by:
setEntityContext in interface javax.ejb.EntityBean
Parameters:
ctx - javax.ejb.EntityContext

unsetEntityContext

public void unsetEntityContext()
This is a required callback method.

Specified by:
unsetEntityContext in interface javax.ejb.EntityBean

ejbActivate

public void ejbActivate()
This required callback method is used for lifecycle notification. No actions need to be taken for ASContextManagedEJB.

Specified by:
ejbActivate in interface javax.ejb.EntityBean

ejbPassivate

public void ejbPassivate()
This required callback method is used for lifecycle notification. No actions need to be taken for ASContextManagedEJB.

Specified by:
ejbPassivate in interface javax.ejb.EntityBean