Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.ejb.plugins
Class CMPPersistenceManager

    java.lang.Object
      |
      +--org.jboss.ejb.plugins.CMPPersistenceManager

All Implemented Interfaces:
  ContainerPlugin, EntityPersistenceManager, Service

public class CMPPersistenceManager
extends java.lang.Object
implements EntityPersistenceManager

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

Version:
  $Revision: 1.21.2.4 $
Author:
  Marc Fleury, danch (Dan Christopherson
See Also:

Constructor Summary
`CMPPersistenceManager()`

Method Summary
`void` | `activateEntity(EntityEnterpriseContext ctx)` This method is called when an entity shall be activated.
`void` | `createEntity(java.lang.reflect.Method m, java.lang.Object[] args, EntityEnterpriseContext ctx)` This method is called whenever an entity is to be created.
`void` | `destroy()`
`java.util.Collection` | `findEntities(java.lang.reflect.Method finderMethod, java.lang.Object[] args, EntityEnterpriseContext ctx)` find multiple entities
`java.lang.Object` | `findEntity(java.lang.reflect.Method finderMethod, java.lang.Object[] args, EntityEnterpriseContext ctx)` This method is called when single entities are to be found.
`void` | `init()`
`protected void` | `invokeLoad(EntityEnterpriseContext ctx)`
`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` | `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

### CMPPersistenceManager

    public CMPPersistenceManager()

Method Detail

### 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

### setPersistenceStore

    public void setPersistenceStore(EntityPersistenceStore store)

### init

    public void init()
              throws java.lang.Exception

  Specified by:
    `init` in interface `Service`

### start

    public void start()
               throws java.lang.Exception

  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 void createEntity(java.lang.reflect.Method m,
                             java.lang.Object[] args,
                             EntityEnterpriseContext ctx)
                      throws java.lang.Exception

  Description copied from interface: `EntityPersistenceManager`
  This method is called whenever an entity is to be created. The persistence manager is responsible for calling the ejbCreate methods on the instance and to handle the results properly wrt the persistent store.
  Specified by:
    `createEntity` in interface `EntityPersistenceManager`
  Following copied from interface: `org.jboss.ejb.EntityPersistenceManager`
  Parameters:
    `m` - the create method in the home interface that was called
    `args` - any create parameters
    `instance` - the instance being used for this create call

### findEntity

    public java.lang.Object findEntity(java.lang.reflect.Method finderMethod,
                                       java.lang.Object[] args,
                                       EntityEnterpriseContext ctx)
                                throws java.lang.Exception

  Description copied from interface: `EntityPersistenceManager`
  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, and if so it shall use the ContainerInvoker plugin to create an EJBObject to the instance, which is to be returned as result.
  Specified by:
    `findEntity` in interface `EntityPersistenceManager`
  Following copied from interface: `org.jboss.ejb.EntityPersistenceManager`
  Parameters:
    `finderMethod` - the find method in the home interface that was called
    `args` - any finder parameters
    `instance` - the instance to use for the finder call
  Returns:
    an EJBObject representing the found entity

### findEntities

    public java.util.Collection findEntities(java.lang.reflect.Method finderMethod,
                                             java.lang.Object[] args,
                                             EntityEnterpriseContext ctx)
                                      throws java.lang.Exception

  find multiple entities
  Specified by:
    `findEntities` in interface `EntityPersistenceManager`
  Following copied from interface: `org.jboss.ejb.EntityPersistenceManager`
  Parameters:
    `finderMethod` - the find method in the home interface that was called
    `args` - any finder parameters
    `instance` - the instance to use for the finder call
  Returns:
    an EJBObject collection representing the found entities

### activateEntity

    public void activateEntity(EntityEnterpriseContext ctx)
                        throws java.rmi.RemoteException

  Description copied from interface: `EntityPersistenceManager`
  This method is called when an entity shall be activated. The persistence manager must call the ejbActivate method on the instance.
  Specified by:
    `activateEntity` in interface `EntityPersistenceManager`
  Following copied from interface: `org.jboss.ejb.EntityPersistenceManager`
  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: `EntityPersistenceManager`
  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 `EntityPersistenceManager`
  Following copied from interface: `org.jboss.ejb.EntityPersistenceManager`
  Parameters:
    `instance` - the instance to synchronize
  Throws:
    `java.rmi.RemoteException` - thrown if some system exception occurs

### storeEntity

    public void storeEntity(EntityEnterpriseContext ctx)
                     throws java.rmi.RemoteException

  Description copied from interface: `EntityPersistenceManager`
  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 `EntityPersistenceManager`
  Following copied from interface: `org.jboss.ejb.EntityPersistenceManager`
  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: `EntityPersistenceManager`
  This method is called when an entity shall be passivate. The persistence manager must call the ejbPassivate method on the instance.
  Specified by:
    `passivateEntity` in interface `EntityPersistenceManager`
  Following copied from interface: `org.jboss.ejb.EntityPersistenceManager`
  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: `EntityPersistenceManager`
  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 `EntityPersistenceManager`
  Following copied from interface: `org.jboss.ejb.EntityPersistenceManager`
  Parameters:
    `instance` - the instance to remove
  Throws:
    `java.rmi.RemoteException` - thrown if some system exception occurs
    `javax.ejb.RemoveException` - thrown if the instance could not be removed

### invokeLoad

    protected void invokeLoad(EntityEnterpriseContext ctx)
                       throws java.rmi.RemoteException

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 The JBoss Organization. All Rights Reserved.