|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb.plugins.CMPPersistenceManager
The CMP Persistence Manager implements the semantics of the CMP EJB 1.1 call back specification.
This Manager works with a "EntityPersistenceStore" that takes care of the physical storing of instances (JAWS, JDBC O/R, FILE, Object).
Field Summary |
Constructor Summary | |
CMPPersistenceManager()
|
Method Summary | |
void |
activateEntity(EntityEnterpriseContext (src) ctx)
This method is called when an entity shall be activated. |
void |
create()
create the service, do expensive operations etc |
java.lang.Object |
createBeanClassInstance()
Returns a new instance of the bean class or a subclass of the bean class. |
void |
createEntity(java.lang.reflect.Method m,
java.lang.Object[] args,
EntityEnterpriseContext (src) ctx)
This method is called whenever an entity is to be created. |
void |
destroy()
destroy the service, tear down |
java.util.Collection |
findEntities(java.lang.reflect.Method finderMethod,
java.lang.Object[] args,
EntityEnterpriseContext (src) ctx,
GenericEntityObjectFactory (src) factory)
find multiple entities |
java.lang.Object |
findEntity(java.lang.reflect.Method finderMethod,
java.lang.Object[] args,
EntityEnterpriseContext (src) ctx,
GenericEntityObjectFactory (src) factory)
This method is called when single entities are to be found. |
EntityPersistenceStore (src) |
getPersistenceStore()
Gets the entity persistence store. |
void |
invokeEjbStore(EntityEnterpriseContext (src) ctx)
Invokes ejbStore on the instance. |
protected void |
invokeLoad(EntityEnterpriseContext (src) ctx)
|
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) ctx)
This method is called when an entity shall be passivate. |
void |
postCreateEntity(java.lang.reflect.Method m,
java.lang.Object[] args,
EntityEnterpriseContext (src) ctx)
This method is called whenever an entity is to be created. |
void |
removeEntity(EntityEnterpriseContext (src) ctx)
This method is called when an entity shall be removed from the underlying storage. |
void |
setContainer(Container (src) c)
This callback is set by the container so that the plugin may access it |
void |
setPersistenceStore(EntityPersistenceStore (src) store)
|
void |
start()
start the service, create is already called |
void |
stop()
stop the service |
void |
storeEntity(EntityEnterpriseContext (src) ctx)
This method is called whenever an entity shall be stored to the underlying storage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CMPPersistenceManager()
Method Detail |
public void setContainer(Container (src) c)
ContainerPlugin (src)
setContainer
in interface ContainerPlugin (src)
c
- The container using this plugin. This may be null if the
plugin is being disassociated from a container.public EntityPersistenceStore (src) getPersistenceStore()
public void setPersistenceStore(EntityPersistenceStore (src) store)
public void create() throws java.lang.Exception
Service (src)
create
in interface Service (src)
java.lang.Exception
public java.lang.Object createBeanClassInstance() throws java.lang.Exception
createBeanClassInstance
in interface EntityPersistenceManager (src)
java.lang.Exception
public void start() throws java.lang.Exception
Service (src)
start
in interface Service (src)
java.lang.Exception
public void stop()
Service (src)
stop
in interface Service (src)
public void destroy()
Service (src)
destroy
in interface Service (src)
public void createEntity(java.lang.reflect.Method m, java.lang.Object[] args, EntityEnterpriseContext (src) ctx) throws java.lang.Exception
EntityPersistenceManager (src)
createEntity
in interface EntityPersistenceManager (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 void postCreateEntity(java.lang.reflect.Method m, java.lang.Object[] args, EntityEnterpriseContext (src) ctx) throws java.lang.Exception
EntityPersistenceManager (src)
postCreateEntity
in interface EntityPersistenceManager (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 findEntity(java.lang.reflect.Method finderMethod, java.lang.Object[] args, EntityEnterpriseContext (src) ctx, GenericEntityObjectFactory (src) factory) throws java.lang.Exception
EntityPersistenceManager (src)
findEntity
in interface EntityPersistenceManager (src)
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersctx
- the instance to use for the finder call
java.lang.Exception
public java.util.Collection findEntities(java.lang.reflect.Method finderMethod, java.lang.Object[] args, EntityEnterpriseContext (src) ctx, GenericEntityObjectFactory (src) factory) throws java.lang.Exception
findEntities
in interface EntityPersistenceManager (src)
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersctx
- the instance to use for the finder call
java.lang.Exception
public void activateEntity(EntityEnterpriseContext (src) ctx) throws java.rmi.RemoteException
EntityPersistenceManager (src)
activateEntity
in interface EntityPersistenceManager (src)
ctx
- the instance to use for the activation
java.rmi.RemoteException
- thrown if some system exception occurspublic void loadEntity(EntityEnterpriseContext (src) ctx) throws java.rmi.RemoteException
EntityPersistenceManager (src)
loadEntity
in interface EntityPersistenceManager (src)
ctx
- the instance to synchronize
java.rmi.RemoteException
- thrown if some system exception occurspublic boolean isStoreRequired(EntityEnterpriseContext (src) ctx) throws java.lang.Exception
EntityPersistenceManager (src)
isStoreRequired
in interface EntityPersistenceManager (src)
ctx
- the instance to check
java.lang.Exception
- thrown if some system exception occurspublic boolean isModified(EntityEnterpriseContext (src) ctx) throws java.lang.Exception
EntityPersistenceManager (src)
isModified
in interface EntityPersistenceManager (src)
ctx
-
java.lang.Exception
public void storeEntity(EntityEnterpriseContext (src) ctx) throws java.rmi.RemoteException
EntityPersistenceManager (src)
storeEntity
in interface EntityPersistenceManager (src)
ctx
- the instance to synchronize
java.rmi.RemoteException
- thrown if some system exception occurspublic void invokeEjbStore(EntityEnterpriseContext (src) ctx) throws java.rmi.RemoteException
EntityPersistenceManager (src)
invokeEjbStore
in interface EntityPersistenceManager (src)
ctx
-
java.rmi.RemoteException
public void passivateEntity(EntityEnterpriseContext (src) ctx) throws java.rmi.RemoteException
EntityPersistenceManager (src)
passivateEntity
in interface EntityPersistenceManager (src)
ctx
- the instance to passivate
java.rmi.RemoteException
- thrown if some system exception occurspublic void removeEntity(EntityEnterpriseContext (src) ctx) throws java.rmi.RemoteException, RemoveException (src)
EntityPersistenceManager (src)
removeEntity
in interface EntityPersistenceManager (src)
ctx
- the instance to remove
RemoveException (src)
- thrown if the instance could not be removed
java.rmi.RemoteException
- thrown if some system exception occursprotected void invokeLoad(EntityEnterpriseContext (src) ctx) throws java.rmi.RemoteException
java.rmi.RemoteException
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |