Java Doc for CMPFilePersistenceManager.java in  » EJB-Server-JBoss-4.2.1 » server » org » jboss » ejb » plugins » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » server » org.jboss.ejb.plugins 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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:
      

Inner Class :static class CMPObjectOutputStream extends ObjectOutputStream
Inner Class :static class CMPObjectInputStream extends ObjectInputStream

Field Summary
final public static  StringDEFAULT_STORE_DIRECTORY_NAME
     The default store directory name ("entities").


Method Summary
public  voidactivateEntity(EntityEnterpriseContext ctx)
     Non-operation.
public  ObjectcreateBeanClassInstance()
    
public  ObjectcreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx)
    
protected  voidcreateService()
    
protected  voiddestroyService()
     Try to remove the store directory, if we can't then ignore.
public  CollectionfindEntities(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory)
    
public  ObjectfindEntity(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory)
    
protected  FilegetFile(Object id)
    
public  FilegetStoreDirectory()
     Returns the directory used to store entity state files.
public  StringgetStoreDirectoryName()
     Get the sub-directory name under the server data directory where entity data is stored.
public  voidinitEntity(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  booleanisModified(EntityEnterpriseContext ctx)
    
public  booleanisStoreRequired(EntityEnterpriseContext ctx)
    
public  voidloadEntity(EntityEnterpriseContext ctx)
    
public  voidpassivateEntity(EntityEnterpriseContext ctx)
     Non-operation.
public  ObjectpostCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx)
    
public  voidremoveEntity(EntityEnterpriseContext ctx)
    
public  voidsetContainer(Container c)
     Saves a reference to the EntityContainer for its bean type.
public  voidsetStoreDirectoryName(String dirName)
     Set the sub-directory name under the server data directory where entity data will be stored.
public  voidstoreEntity(EntityEnterpriseContext ctx)
    

Field Detail
DEFAULT_STORE_DIRECTORY_NAME
final public static String DEFAULT_STORE_DIRECTORY_NAME(Code)
The default store directory name ("entities").





Method Detail
activateEntity
public void activateEntity(EntityEnterpriseContext ctx)(Code)
Non-operation.



createBeanClassInstance
public Object createBeanClassInstance() throws Exception(Code)



createEntity
public Object createEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception(Code)



createService
protected void createService() throws Exception(Code)



destroyService
protected void destroyService() throws Exception(Code)
Try to remove the store directory, if we can't then ignore.



findEntities
public Collection findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory)(Code)



findEntity
public Object findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext ctx, GenericEntityObjectFactory factory) throws FinderException(Code)



getFile
protected File getFile(Object id)(Code)



getStoreDirectory
public File getStoreDirectory()(Code)
Returns the directory used to store entity state files. The directory used to store entity state files.



getStoreDirectoryName
public String getStoreDirectoryName()(Code)
Get the sub-directory name under the server data directory where entity data is stored.
See Also:   CMPFilePersistenceManager.setStoreDirectoryName A sub-directory name.



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).




isModified
public boolean isModified(EntityEnterpriseContext ctx) throws Exception(Code)



isStoreRequired
public boolean isStoreRequired(EntityEnterpriseContext ctx) throws Exception(Code)



loadEntity
public void loadEntity(EntityEnterpriseContext ctx)(Code)



passivateEntity
public void passivateEntity(EntityEnterpriseContext ctx)(Code)
Non-operation.



postCreateEntity
public Object postCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception(Code)



removeEntity
public void removeEntity(EntityEnterpriseContext ctx) throws RemoveException(Code)



setContainer
public void setContainer(Container c)(Code)
Saves a reference to the EntityContainer for its bean type.
throws:
  ClassCastException - Container is not a EntityContainer.



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.




storeEntity
public void storeEntity(EntityEnterpriseContext ctx)(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.