Java Doc for CMPInMemoryPersistenceManager.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.CMPInMemoryPersistenceManager

CMPInMemoryPersistenceManager
public class CMPInMemoryPersistenceManager extends ServiceMBeanSupport implements EntityPersistenceStore(Code)
EntityPersistenceStore implementation storing values in-memory for very efficient access.
See Also:   org.jboss.ejb.EntityPersistenceStore
See Also:   org.jboss.ejb.plugins.CMPFilePersistenceManager
version:
   $Revision: 57209 $
author:
   Sacha Labourey.
author:
   Jason Dillon
author:
  

Revisions:
author:
  

28.12.2001 - Sacha Labourey:
author:
  


    author:
      
  • First implementation highly based on CMPFilePersistenceManager

  • author:
      

author:
  

25.05.2002 - Dain Sundstrom:
author:
  


    author:
      
  • Replaced FinderResults with Collection

  • author:
      

Inner Class :static class CMPObjectOutputStream extends java.io.ObjectOutputStream
Inner Class :static class CMPObjectInputStream extends java.io.ObjectInputStream

Field Summary
protected  HashMapbeans
    
protected  EntityContainercon
    
protected  FieldidField
    
protected  MethodisModified
     Optional isModified method used by storeEntity.

Constructor Summary
public  CMPInMemoryPersistenceManager()
    

Method Summary
public  voidactivateEntity(EntityEnterpriseContext instance)
     Non-operation.
public  ObjectcreateBeanClassInstance()
     Returns a new instance of the bean class or a subclass of the bean class.
public  ObjectcreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx)
     This method is called whenever an entity is to be created.
protected  voidcreateService()
    
public  CollectionfindEntities(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory)
     This method is called when collections of entities are to be found.
public  ObjectfindEntity(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory)
     This method is called when single entities are to be found.
public  voidinitEntity(EntityEnterpriseContext ctx)
     Initializes the instance context.
public  booleanisModified(EntityEnterpriseContext ctx)
    
public  booleanisStoreRequired(EntityEnterpriseContext ctx)
     This method is used to determine if an entity should be stored.
public  voidloadEntity(EntityEnterpriseContext ctx)
     This method is called whenever an entity shall be load from the underlying storage.
public  voidpassivateEntity(EntityEnterpriseContext instance)
     Non-operation.
public  ObjectpostCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx)
     This method is called after the createEntity.
public  voidremoveEntity(EntityEnterpriseContext ctx)
     This method is called when an entity shall be removed from the underlying storage.
public  voidsetContainer(Container con)
    
protected  voidstopService()
    
public  voidstoreEntity(EntityEnterpriseContext ctx)
     This method is called whenever an entity shall be stored to the underlying storage.
protected  voidstoreEntity(Object id, Object obj)
    

Field Detail
beans
protected HashMap beans(Code)



con
protected EntityContainer con(Code)



idField
protected Field idField(Code)



isModified
protected Method isModified(Code)
Optional isModified method used by storeEntity.




Constructor Detail
CMPInMemoryPersistenceManager
public CMPInMemoryPersistenceManager()(Code)




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



createBeanClassInstance
public Object createBeanClassInstance() throws Exception(Code)
Returns a new instance of the bean class or a subclass of the bean class. the new instance
throws:
  Exception -



createEntity
public Object createEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception(Code)
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.
Parameters:
  m - the create method in the home interface that wascalled
Parameters:
  args - any create parameters
Parameters:
  ctx - the instance being used for this create call The primary key computed by CMP PM or null for BMP
throws:
  Exception -



createService
protected void createService() throws Exception(Code)
create the service, do expensive operations etc



findEntities
public Collection findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws Exception(Code)
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.
Parameters:
  finderMethod - the find method in the home interface that wascalled
Parameters:
  args - any finder parameters
Parameters:
  instance - the instance to use for the finder call an primary key collection representing the foundentities
throws:
  Exception - thrown if some heuristic problem occurs



findEntity
public Object findEntity(Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws Exception(Code)
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.
Parameters:
  finderMethod - the find method in the home interface that wascalled
Parameters:
  args - any finder parameters
Parameters:
  instance - the instance to use for the finder call a primary key representing the found entity
throws:
  Exception - thrown if some heuristic problem occurs



initEntity
public void initEntity(EntityEnterpriseContext ctx)(Code)
Initializes the instance context.

This method is called before createEntity, and should reset the value of all cmpFields to 0 or null.
Parameters:
  ctx -




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



isStoreRequired
public boolean isStoreRequired(EntityEnterpriseContext ctx) throws Exception(Code)
This method is used to determine if an entity should be stored.
Parameters:
  ctx - the instance to check true, if the entity has been modified
throws:
  Exception - thrown if some system exception occurs



loadEntity
public void loadEntity(EntityEnterpriseContext ctx)(Code)
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.
Parameters:
  ctx - the instance to synchronize



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



postCreateEntity
public Object postCreateEntity(Method m, Object[] args, EntityEnterpriseContext ctx) throws Exception(Code)
This method is called after the createEntity. The persistence manager is responsible for handling the results properly wrt the persistent store.
Parameters:
  m - the ejbPostCreate method in the bean class that wascalled
Parameters:
  args - any create parameters
Parameters:
  ctx - the instance being used for this create call null
throws:
  Exception -



removeEntity
public void removeEntity(EntityEnterpriseContext ctx) throws javax.ejb.RemoveException(Code)
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.
Parameters:
  ctx - the instance to remove
throws:
  javax.ejb.RemoveException - thrown if the instance could not be removed



setContainer
public void setContainer(Container con)(Code)
This callback is set by the container so that the plugin may access it
Parameters:
  con - The container using this plugin.
throws:
  ClassCastException - Container is not a EntityContainer.



stopService
protected void stopService() throws Exception(Code)



storeEntity
public void storeEntity(EntityEnterpriseContext ctx)(Code)
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.
Parameters:
  ctx - the instance to synchronize



storeEntity
protected void storeEntity(Object id, Object obj)(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.