| org.jboss.ejb.plugins.CMPFilePersistenceManager
CMPFilePersistenceManager | public class CMPFilePersistenceManager extends ServiceMBeanSupport implements EntityPersistenceStore(Code) | | A file-based CMP entity bean persistence manager.
Reads and writes entity bean objects to files by using the
standard Java serialization mechanism.
Enitiy state files are stored under:
jboss-server-data-dir/storeDirectoryName/ejb-name.
Note, currently the name of the entity must be unique across the server, or
unless the store directory is changed, to avoid data collisions.
jason: disabled because XDoclet can not handle \u0000 right now
_@_jmx:mbean extends="org.jboss.system.ServiceMBean"
version: $Revision: 57209 $ author: Rickard Öberg author: Marc Fleury author: Jason Dillon author: 20010801 marc fleury: author: author: - - insertion in cache upon create in now done in the instance interceptor
author:
author: 20011201 Dain Sundstrom: author: author: - - added createBeanInstance and initEntity methods
author:
author: 20020525 Dain Sundstrom: author: author: - - Replaced FinderResults with Collection
author: - - Removed unused method loadEntities
author:
|
Method Summary | |
public void | activateEntity(EntityEnterpriseContext ctx) Non-operation. | public Object | createBeanClassInstance() | public Object | createEntity(Method m, Object[] args, EntityEnterpriseContext ctx) | protected void | createService() | protected void | destroyService() Try to remove the store directory, if we can't then ignore. | public Collection | findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory) | public Object | findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory) | protected File | getFile(Object id) | public File | getStoreDirectory() Returns the directory used to store entity state files. | public String | getStoreDirectoryName() Get the sub-directory name under the server data directory
where entity data is stored. | public void | initEntity(EntityEnterpriseContext ctx) Reset all attributes to default value
The EJB 1.1 specification is not entirely clear about this,
the EJB 2.0 spec is, see page 169. | public boolean | isModified(EntityEnterpriseContext ctx) | public boolean | isStoreRequired(EntityEnterpriseContext ctx) | public void | loadEntity(EntityEnterpriseContext ctx) | public void | passivateEntity(EntityEnterpriseContext ctx) Non-operation. | public Object | postCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx) | public void | removeEntity(EntityEnterpriseContext ctx) | public void | setContainer(Container c) Saves a reference to the
EntityContainer for
its bean type. | public void | setStoreDirectoryName(String dirName) Set the sub-directory name under the server data directory
where entity data will be stored. | public void | storeEntity(EntityEnterpriseContext ctx) |
DEFAULT_STORE_DIRECTORY_NAME | final public static String DEFAULT_STORE_DIRECTORY_NAME(Code) | | The default store directory name ("entities").
|
destroyService | protected void destroyService() throws Exception(Code) | | Try to remove the store directory, if we can't then ignore.
|
getStoreDirectory | public File getStoreDirectory()(Code) | | Returns the directory used to store entity state files.
The directory used to store entity state files. |
initEntity | public void initEntity(EntityEnterpriseContext ctx)(Code) | | Reset all attributes to default value
The EJB 1.1 specification is not entirely clear about this,
the EJB 2.0 spec is, see page 169.
Robustness is more important than raw speed for most server
applications, and not resetting atrribute values result in
very* weird errors (old states re-appear in different instances and the
developer thinks he's on drugs).
|
setStoreDirectoryName | public void setStoreDirectoryName(String dirName)(Code) | | Set the sub-directory name under the server data directory
where entity data will be stored.
This value will be appened to the value of
jboss-server-data-dir.
This value is only used during creation and will not dynamically
change the store directory when set after the create step has finished.
Parameters: dirName - A sub-directory name. |
|
|