| 
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.ejb.plugins.CMPInMemoryPersistenceManager
EntityPersistenceStore implementation storing values in-memory for very efficient access.
EntityPersistenceStore (src) , 
CMPFilePersistenceManager (src) | Field Summary | |
protected  java.util.HashMap | 
beans
 | 
protected  EntityContainer (src)  | 
con
 | 
protected  java.lang.reflect.Field | 
idField
 | 
protected  java.lang.reflect.Method | 
isModified
Optional isModified method used by storeEntity.  | 
| Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) | 
log, server, SERVICE_CONTROLLER_SIG, serviceName | 
| Fields inherited from interface org.jboss.system.ServiceMBean (src) | 
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED | 
| Constructor Summary | |
CMPInMemoryPersistenceManager()
 | 
|
| Method Summary | |
 void | 
activateEntity(EntityEnterpriseContext (src)  instance)
Non-operation.  | 
 java.lang.Object | 
createBeanClassInstance()
Returns a new instance of the bean class or a subclass of the bean class.  | 
 java.lang.Object | 
createEntity(java.lang.reflect.Method m,
             java.lang.Object[] args,
             EntityEnterpriseContext (src)  ctx)
This method is called whenever an entity is to be created.  | 
protected  void | 
createService()
create the service, do expensive operations etc  | 
 java.util.Collection | 
findEntities(java.lang.reflect.Method finderMethod,
             java.lang.Object[] args,
             EntityEnterpriseContext (src)  instance,
             GenericEntityObjectFactory (src)  factory)
This method is called when collections of entities are to be found.  | 
 java.lang.Object | 
findEntity(java.lang.reflect.Method finderMethod,
           java.lang.Object[] args,
           EntityEnterpriseContext (src)  instance,
           GenericEntityObjectFactory (src)  factory)
This method is called when single entities are to be found.  | 
 void | 
initEntity(EntityEnterpriseContext (src)  ctx)
Initializes the instance context.  | 
 boolean | 
isModified(EntityEnterpriseContext (src)  ctx)
This method is used to determined whether the instance was modified.  | 
 boolean | 
isStoreRequired(EntityEnterpriseContext (src)  ctx)
This method is used to determine if an entity should be stored.  | 
 void | 
loadEntity(EntityEnterpriseContext (src)  ctx)
This method is called whenever an entity shall be load from the underlying storage.  | 
 void | 
passivateEntity(EntityEnterpriseContext (src)  instance)
Non-operation.  | 
 java.lang.Object | 
postCreateEntity(java.lang.reflect.Method m,
                 java.lang.Object[] args,
                 EntityEnterpriseContext (src)  ctx)
This method is called after the createEntity.  | 
 void | 
removeEntity(EntityEnterpriseContext (src)  ctx)
This method is called when an entity shall be removed from the underlying storage.  | 
 void | 
setContainer(Container (src)  con)
This callback is set by the container so that the plugin may access it  | 
protected  void | 
stopService()
Sub-classes should override this method to provide custum 'stop' logic.  | 
 void | 
storeEntity(EntityEnterpriseContext (src)  ctx)
This method is called whenever an entity shall be stored to the underlying storage.  | 
protected  void | 
storeEntity(java.lang.Object id,
            java.lang.Object obj)
 | 
| Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) | 
create, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop | 
| Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src) | 
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.jboss.system.Service (src) | 
create, destroy, start, stop | 
| Field Detail | 
protected EntityContainer (src) con
protected java.util.HashMap beans
protected java.lang.reflect.Field idField
protected java.lang.reflect.Method isModified
| Constructor Detail | 
public CMPInMemoryPersistenceManager()
| Method Detail | 
public void setContainer(Container (src) con)
setContainer in interface ContainerPlugin (src) con - The container using this plugin.
java.lang.ClassCastException - Container is not a EntityContainer.
protected void createService()
                      throws java.lang.Exception
createService in class ServiceMBeanSupport (src) java.lang.Exception
protected void stopService()
                    throws java.lang.Exception
ServiceMBeanSupport (src) This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
stopService in class ServiceMBeanSupport (src) java.lang.Exception
public java.lang.Object createBeanClassInstance()
                                         throws java.lang.Exception
createBeanClassInstance in interface EntityPersistenceStore (src) java.lang.Exceptionpublic void initEntity(EntityEnterpriseContext (src) ctx)
This method is called before createEntity, and should reset the value of all cmpFields to 0 or null.
initEntity in interface EntityPersistenceStore (src) ctx - 
public java.lang.Object createEntity(java.lang.reflect.Method m,
                                     java.lang.Object[] args,
                                     EntityEnterpriseContext (src)  ctx)
                              throws java.lang.Exception
createEntity in interface EntityPersistenceStore (src) m - the create method in the home interface that was
                   calledargs - any create parametersctx - the instance being used for this create call
java.lang.Exception
public java.lang.Object postCreateEntity(java.lang.reflect.Method m,
                                         java.lang.Object[] args,
                                         EntityEnterpriseContext (src)  ctx)
                                  throws java.lang.Exception
postCreateEntity in interface EntityPersistenceStore (src) m - the ejbPostCreate method in the bean class that was
                    calledargs - any create parametersctx - the instance being used for this create call
java.lang.Exception
public java.lang.Object findEntity(java.lang.reflect.Method finderMethod,
                                   java.lang.Object[] args,
                                   EntityEnterpriseContext (src)  instance,
                                   GenericEntityObjectFactory (src)  factory)
                            throws java.lang.Exception
findEntity in interface EntityPersistenceStore (src) finderMethod - the find method in the home interface that was
                       calledargs - any finder parametersinstance - the instance to use for the finder call
java.lang.Exception - thrown if some heuristic problem occurs
public java.util.Collection findEntities(java.lang.reflect.Method finderMethod,
                                         java.lang.Object[] args,
                                         EntityEnterpriseContext (src)  instance,
                                         GenericEntityObjectFactory (src)  factory)
                                  throws java.lang.Exception
findEntities in interface EntityPersistenceStore (src) finderMethod - the find method in the home interface that was
                       calledargs - any finder parametersinstance - the instance to use for the finder call
java.lang.Exception - thrown if some heuristic problem occurspublic void activateEntity(EntityEnterpriseContext (src) instance)
activateEntity in interface EntityPersistenceStore (src) instance - the instance to use for the activationpublic void loadEntity(EntityEnterpriseContext (src) ctx)
loadEntity in interface EntityPersistenceStore (src) ctx - the instance to synchronize
public boolean isStoreRequired(EntityEnterpriseContext (src)  ctx)
                        throws java.lang.Exception
isStoreRequired in interface EntityPersistenceStore (src) ctx - the instance to check
java.lang.Exception - thrown if some system exception occurs
public boolean isModified(EntityEnterpriseContext (src)  ctx)
                   throws java.lang.Exception
EntityPersistenceStore (src) 
isModified in interface EntityPersistenceStore (src) ctx - 
java.lang.Exceptionpublic void storeEntity(EntityEnterpriseContext (src) ctx)
storeEntity in interface EntityPersistenceStore (src) ctx - the instance to synchronizepublic void passivateEntity(EntityEnterpriseContext (src) instance)
passivateEntity in interface EntityPersistenceStore (src) instance - the instance to passivate
public void removeEntity(EntityEnterpriseContext (src)  ctx)
                  throws RemoveException (src) 
removeEntity in interface EntityPersistenceStore (src) ctx - the instance to remove
RemoveException (src)  - thrown if the instance could not be removed
protected void storeEntity(java.lang.Object id,
                           java.lang.Object obj)
  | 
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||