- Version:
- $Revision: 1.9 $
- Author:
- Rickard Öberg (rickard.oberg@telkel.com), Marc Fleury
- See Also:
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CMPFilePersistenceManager
public CMPFilePersistenceManager()
setContainer
public void setContainer(Container c)
- Description copied from interface:
ContainerPlugin
- This callback is set by the container so that the plugin may access it
- Specified by:
setContainer
in interface ContainerPlugin
- Following copied from interface:
org.jboss.ejb.ContainerPlugin
- Parameters:
con
- the container using this plugin
init
public void init()
throws java.lang.Exception
- Specified by:
init
in interface Service
start
public void start()
- Specified by:
start
in interface Service
stop
public void stop()
- Specified by:
stop
in interface Service
destroy
public void destroy()
- Specified by:
destroy
in interface Service
createEntity
public java.lang.Object createEntity(java.lang.reflect.Method m,
java.lang.Object[] args,
EntityEnterpriseContext ctx)
throws java.lang.Exception
- Description copied from interface:
EntityPersistenceStore
- 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.
The return is
The primary key in case of CMP PM
Null in case of BMP PM (but no store should exist)
- Specified by:
createEntity
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
m
- the create method in the home interface that was calledargs
- any create parametersinstance
- the instance being used for this create call- Returns:
- Object, the primary key computed by CMP PM or null for BMP
- Throws:
java.lang.Exception
-
findEntity
public java.lang.Object findEntity(java.lang.reflect.Method finderMethod,
java.lang.Object[] args,
EntityEnterpriseContext ctx)
throws java.rmi.RemoteException,
javax.ejb.FinderException
- Description copied from interface:
EntityPersistenceStore
- 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.
- Specified by:
findEntity
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
finderMethod
- the find method in the home interface that was calledargs
- any finder parametersinstance
- the instance to use for the finder call- Returns:
- a primary key representing the found entity
- Throws:
java.rmi.RemoteException
- thrown if some system exception occursjavax.ejb.FinderException
- thrown if some heuristic problem occurs
findEntities
public FinderResults findEntities(java.lang.reflect.Method finderMethod,
java.lang.Object[] args,
EntityEnterpriseContext ctx)
throws java.rmi.RemoteException
- Description copied from interface:
EntityPersistenceStore
- 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.
- Specified by:
findEntities
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
finderMethod
- the find method in the home interface that was calledargs
- any finder parametersinstance
- the instance to use for the finder call- Returns:
- an primary key collection representing the found entities
- Throws:
java.rmi.RemoteException
- thrown if some system exception occursjavax.ejb.FinderException
- thrown if some heuristic problem occurs
activateEntity
public void activateEntity(EntityEnterpriseContext ctx)
throws java.rmi.RemoteException
- Description copied from interface:
EntityPersistenceStore
- This method is called when an entity shall be activated.
With the PersistenceManager factorization most EJB calls should not exists
However this calls permits us to introduce optimizations in the persistence
store. Particularly the context has a "PersistenceContext" that a
PersistenceStore can use (JAWS does for smart updates) and this is as good a
callback as any other to set it up.
- Specified by:
activateEntity
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
instance
- the instance to use for the activation- Throws:
java.rmi.RemoteException
- thrown if some system exception occurs
loadEntity
public void loadEntity(EntityEnterpriseContext ctx)
throws java.rmi.RemoteException
- Description copied from interface:
EntityPersistenceStore
- 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.
- Specified by:
loadEntity
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
instance
- the instance to synchronize- Throws:
java.rmi.RemoteException
- thrown if some system exception occurs
loadEntities
public void loadEntities(FinderResults keys)
- Description copied from interface:
EntityPersistenceStore
- This method is called whenever a set of entities should be preloaded from
the underlying storage. The persistence store is allowed to make this a
null operation
- Specified by:
loadEntities
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
instances
- the EntityEnterpriseContexts for the entities that must be loadedkeys
- a PagableKeyCollection previously returned from findEntities.
storeEntity
public void storeEntity(EntityEnterpriseContext ctx)
throws java.rmi.RemoteException
- Description copied from interface:
EntityPersistenceStore
- 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.
- Specified by:
storeEntity
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
instance
- the instance to synchronize- Throws:
java.rmi.RemoteException
- thrown if some system exception occurs
passivateEntity
public void passivateEntity(EntityEnterpriseContext ctx)
throws java.rmi.RemoteException
- Description copied from interface:
EntityPersistenceStore
- This method is called when an entity shall be passivate. The persistence manager must call the ejbPassivate
method on the instance.
See the activate discussion for the reason for exposing EJB callback calls to
the store.
- Specified by:
passivateEntity
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
instance
- the instance to passivate- Throws:
java.rmi.RemoteException
- thrown if some system exception occurs
removeEntity
public void removeEntity(EntityEnterpriseContext ctx)
throws java.rmi.RemoteException,
javax.ejb.RemoveException
- Description copied from interface:
EntityPersistenceStore
- 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.
- Specified by:
removeEntity
in interface EntityPersistenceStore
- Following copied from interface:
org.jboss.ejb.EntityPersistenceStore
- Parameters:
instance
- the instance to remove- Throws:
java.rmi.RemoteException
- thrown if some system exception occursjavax.ejb.RemoveException
- thrown if the instance could not be removed
getFile
protected java.io.File getFile(java.lang.Object id)
Copyright © 2000 The JBoss Organization. All Rights Reserved.