|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 ctx)
This method is called when an entity shall be activated. |
void |
create()
|
Object |
createBeanClassInstance()
Returns a new instance of the bean class or a subclass of the bean class. |
void |
createEntity(Method m,
Object[] args,
EntityEnterpriseContext ctx)
This method is called whenever an entity is to be created. |
void |
destroy()
|
Collection |
findEntities(Method finderMethod,
Object[] args,
EntityEnterpriseContext ctx,
GenericEntityObjectFactory factory)
find multiple entities |
Object |
findEntity(Method finderMethod,
Object[] args,
EntityEnterpriseContext ctx,
GenericEntityObjectFactory factory)
This method is called when single entities are to be found. |
EntityPersistenceStore |
getPersistenceStore()
Gets the entity persistence store. |
void |
invokeEjbStore(EntityEnterpriseContext ctx)
Invokes ejbStore on the instance. |
protected void |
invokeLoad(EntityEnterpriseContext ctx)
|
boolean |
isModified(EntityEnterpriseContext ctx)
This method is used to determined whether the instance was modified. |
boolean |
isStoreRequired(EntityEnterpriseContext ctx)
This method is used to determine if an entity should be stored. |
void |
loadEntity(EntityEnterpriseContext ctx)
This method is called whenever an entity shall be load from the underlying storage. |
void |
passivateEntity(EntityEnterpriseContext ctx)
This method is called when an entity shall be passivate. |
void |
postCreateEntity(Method m,
Object[] args,
EntityEnterpriseContext ctx)
This method is called whenever an entity is to be created. |
void |
removeEntity(EntityEnterpriseContext ctx)
This method is called when an entity shall be removed from the underlying storage. |
void |
setContainer(Container c)
This callback is set by the container so that the plugin may access it |
void |
setPersistenceStore(EntityPersistenceStore store)
|
void |
start()
|
void |
stop()
|
void |
storeEntity(EntityEnterpriseContext 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 c)
ContainerPlugin
setContainer
in interface ContainerPlugin
c
- The container using this plugin. This may be null if the
plugin is being disassociated from a container.public EntityPersistenceStore getPersistenceStore()
public void setPersistenceStore(EntityPersistenceStore store)
public void create() throws Exception
create
in interface org.jboss.system.Service
Exception
public Object createBeanClassInstance() throws Exception
createBeanClassInstance
in interface EntityPersistenceManager
Exception
public void start() throws Exception
start
in interface org.jboss.system.Service
Exception
public void stop()
stop
in interface org.jboss.system.Service
public void destroy()
destroy
in interface org.jboss.system.Service
public void createEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception
EntityPersistenceManager
createEntity
in interface EntityPersistenceManager
m
- the create method in the home interface that was
calledargs
- any create parametersctx
- the instance being used for this create call
Exception
public void postCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception
EntityPersistenceManager
postCreateEntity
in interface EntityPersistenceManager
m
- the create method in the home interface that was
calledargs
- any create parametersctx
- the instance being used for this create call
Exception
public Object findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory) throws Exception
EntityPersistenceManager
findEntity
in interface EntityPersistenceManager
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersctx
- the instance to use for the finder call
Exception
public Collection findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory) throws Exception
findEntities
in interface EntityPersistenceManager
finderMethod
- the find method in the home interface that was
calledargs
- any finder parametersctx
- the instance to use for the finder call
Exception
public void activateEntity(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceManager
activateEntity
in interface EntityPersistenceManager
ctx
- the instance to use for the activation
RemoteException
- thrown if some system exception occurspublic void loadEntity(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceManager
loadEntity
in interface EntityPersistenceManager
ctx
- the instance to synchronize
RemoteException
- thrown if some system exception occurspublic boolean isStoreRequired(EntityEnterpriseContext ctx) throws Exception
EntityPersistenceManager
isStoreRequired
in interface EntityPersistenceManager
ctx
- the instance to check
Exception
- thrown if some system exception occurspublic boolean isModified(EntityEnterpriseContext ctx) throws Exception
EntityPersistenceManager
isModified
in interface EntityPersistenceManager
ctx
-
Exception
public void storeEntity(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceManager
storeEntity
in interface EntityPersistenceManager
ctx
- the instance to synchronize
RemoteException
- thrown if some system exception occurspublic void invokeEjbStore(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceManager
invokeEjbStore
in interface EntityPersistenceManager
ctx
-
RemoteException
public void passivateEntity(EntityEnterpriseContext ctx) throws RemoteException
EntityPersistenceManager
passivateEntity
in interface EntityPersistenceManager
ctx
- the instance to passivate
RemoteException
- thrown if some system exception occurspublic void removeEntity(EntityEnterpriseContext ctx) throws RemoteException, javax.ejb.RemoveException
EntityPersistenceManager
removeEntity
in interface EntityPersistenceManager
ctx
- the instance to remove
javax.ejb.RemoveException
- thrown if the instance could not be removed
RemoteException
- thrown if some system exception occursprotected void invokeLoad(EntityEnterpriseContext ctx) throws RemoteException
RemoteException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |