Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » ejb » plugins » [javadoc | source]
org.jboss.ejb.plugins
public class: CMPInMemoryPersistenceManager [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.ejb.plugins.CMPInMemoryPersistenceManager

All Implemented Interfaces:
    EntityPersistenceStore, org.jboss.kernel.spi.dependency.KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

EntityPersistenceStore implementation storing values in-memory for very efficient access.
Nested Class Summary:
static class  CMPInMemoryPersistenceManager.CMPObjectOutputStream   
static class  CMPInMemoryPersistenceManager.CMPObjectInputStream   
Field Summary
protected  EntityContainer con     
protected  HashMap beans     
protected  Field idField     
protected  Method isModified    Optional isModified method used by storeEntity. 
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Constructor:
 public CMPInMemoryPersistenceManager() 
Method from org.jboss.ejb.plugins.CMPInMemoryPersistenceManager Summary:
activateEntity,   createBeanClassInstance,   createEntity,   createService,   findEntities,   findEntity,   initEntity,   isModified,   isStoreRequired,   loadEntity,   passivateEntity,   postCreateEntity,   removeEntity,   setContainer,   stopService,   storeEntity,   storeEntity
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.plugins.CMPInMemoryPersistenceManager Detail:
 public  void activateEntity(EntityEnterpriseContext instance) 
    Non-operation.
 public Object createBeanClassInstance() throws Exception 
    Returns a new instance of the bean class or a subclass of the bean class.
 public Object createEntity(Method m,
    Object[] args,
    EntityEnterpriseContext ctx) throws Exception 
    This method is called whenever an entity is to be created. The persistence manager is responsible for handling the results properly wrt the persistent store.
 protected  void createService() throws Exception 
    create the service, do expensive operations etc
 public Collection findEntities(Method finderMethod,
    Object[] args,
    EntityEnterpriseContext instance,
    GenericEntityObjectFactory factory) throws Exception 
    This method is called when collections of entities are to be found. The persistence manager must find out whether the wanted instances are available in the persistence store, and if so it must return a collection of primaryKeys.
 public Object findEntity(Method finderMethod,
    Object[] args,
    EntityEnterpriseContext instance,
    GenericEntityObjectFactory factory) throws Exception 
    This method is called when single entities are to be found. The persistence manager must find out whether the wanted instance is available in the persistence store, if so it returns the primary key of the object.
 public  void initEntity(EntityEnterpriseContext ctx) 
    Initializes the instance context.

    This method is called before createEntity, and should reset the value of all cmpFields to 0 or null.

 public boolean isModified(EntityEnterpriseContext ctx) throws Exception 
 public boolean isStoreRequired(EntityEnterpriseContext ctx) throws Exception 
    This method is used to determine if an entity should be stored.
 public  void loadEntity(EntityEnterpriseContext ctx) 
    This method is called whenever an entity shall be load from the underlying storage. The persistence manager must load the state from the underlying storage and then call ejbLoad on the supplied instance.
 public  void passivateEntity(EntityEnterpriseContext instance) 
    Non-operation.
 public Object postCreateEntity(Method m,
    Object[] args,
    EntityEnterpriseContext ctx) throws Exception 
    This method is called after the createEntity. The persistence manager is responsible for handling the results properly wrt the persistent store.
 public  void removeEntity(EntityEnterpriseContext ctx) throws RemoveException 
    This method is called when an entity shall be removed from the underlying storage. The persistence manager must call ejbRemove on the instance and then remove its state from the underlying storage.
 public  void setContainer(Container con) 
    This callback is set by the container so that the plugin may access it
 protected  void stopService() throws Exception 
 public  void storeEntity(EntityEnterpriseContext ctx) 
    This method is called whenever an entity shall be stored to the underlying storage. The persistence manager must call ejbStore on the supplied instance and then store the state to the underlying storage.
 protected  void storeEntity(Object id,
    Object obj)