org.mobicents.slee.resource.persistence.ra
Class PersistenceResourceAdaptor

java.lang.Object
  extended by org.mobicents.slee.resource.persistence.ra.PersistenceResourceAdaptor
All Implemented Interfaces:
java.io.Serializable, javax.slee.resource.ResourceAdaptor, ActivityManipulation

public class PersistenceResourceAdaptor
extends java.lang.Object
implements javax.slee.resource.ResourceAdaptor, java.io.Serializable, ActivityManipulation

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.slee.resource.ResourceAdaptor
SBB_PROCESSED_EVENT
 
Constructor Summary
PersistenceResourceAdaptor()
           
 
Method Summary
 void activityEnded(javax.slee.resource.ActivityHandle arg0)
           
 void activityUnreferenced(javax.slee.resource.ActivityHandle arg0)
           
 void addActivity(SbbEntityManagerImpl em)
           
 void entityActivated()
           
 void entityCreated(javax.slee.resource.BootstrapContext ctx)
           
 void entityDeactivated()
           
 void entityDeactivating()
           
 void entityRemoved()
           
 void eventProcessingFailed(javax.slee.resource.ActivityHandle arg0, java.lang.Object arg1, int arg2, javax.slee.Address arg3, int arg4, javax.slee.resource.FailureReason arg5)
           
 void eventProcessingSuccessful(javax.slee.resource.ActivityHandle arg0, java.lang.Object arg1, int arg2, javax.slee.Address arg3, int arg4)
           
 java.lang.Object getActivity(javax.slee.resource.ActivityHandle arg0)
           
 javax.slee.resource.ActivityHandle getActivityHandle(java.lang.Object arg0)
           
 javax.slee.resource.Marshaler getMarshaler()
           
 java.lang.String getPersistanceUnitName()
           
 java.lang.Object getSBBResourceAdaptorInterface(java.lang.String arg0)
           
 boolean isEMFOpen(java.lang.String puName)
          Checks wheather EMF is present, and if it is, it checks if its open.
 void queryLiveness(javax.slee.resource.ActivityHandle arg0)
           
 void removeActivity(SbbEntityManagerImpl em)
           
 void serviceActivated(java.lang.String arg0)
           
 void serviceDeactivated(java.lang.String arg0)
           
 void serviceInstalled(java.lang.String arg0, int[] arg1, java.lang.String[] arg2)
           
 void serviceUninstalled(java.lang.String arg0)
           
 void setPersistenceUnitName(java.lang.String name)
           
 void stop()
           
 void stopEntityManagers()
           
 void stopping()
           
 javax.persistence.EntityManagerFactory subscribeForEntityManagerFactoryForPU(java.lang.String puName, java.util.Map emfProperties)
          This method notifies that someone is interesetd in using EMF for particular PU.
 void unsubscribeForEntityManagerFactoryForPU(java.lang.String puName)
          Notifies that soemone is no longer interesetd in using EMF for certain PU.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceResourceAdaptor

public PersistenceResourceAdaptor()
Method Detail

stopping

public void stopping()

stop

public void stop()

stopEntityManagers

public void stopEntityManagers()

entityCreated

public void entityCreated(javax.slee.resource.BootstrapContext ctx)
                   throws javax.slee.resource.ResourceException
Specified by:
entityCreated in interface javax.slee.resource.ResourceAdaptor
Throws:
javax.slee.resource.ResourceException

entityActivated

public void entityActivated()
                     throws javax.slee.resource.ResourceException
Specified by:
entityActivated in interface javax.slee.resource.ResourceAdaptor
Throws:
javax.slee.resource.ResourceException

entityDeactivated

public void entityDeactivated()
Specified by:
entityDeactivated in interface javax.slee.resource.ResourceAdaptor

entityDeactivating

public void entityDeactivating()
Specified by:
entityDeactivating in interface javax.slee.resource.ResourceAdaptor

activityEnded

public void activityEnded(javax.slee.resource.ActivityHandle arg0)
Specified by:
activityEnded in interface javax.slee.resource.ResourceAdaptor

activityUnreferenced

public void activityUnreferenced(javax.slee.resource.ActivityHandle arg0)
Specified by:
activityUnreferenced in interface javax.slee.resource.ResourceAdaptor

entityRemoved

public void entityRemoved()
Specified by:
entityRemoved in interface javax.slee.resource.ResourceAdaptor

eventProcessingFailed

public void eventProcessingFailed(javax.slee.resource.ActivityHandle arg0,
                                  java.lang.Object arg1,
                                  int arg2,
                                  javax.slee.Address arg3,
                                  int arg4,
                                  javax.slee.resource.FailureReason arg5)
Specified by:
eventProcessingFailed in interface javax.slee.resource.ResourceAdaptor

eventProcessingSuccessful

public void eventProcessingSuccessful(javax.slee.resource.ActivityHandle arg0,
                                      java.lang.Object arg1,
                                      int arg2,
                                      javax.slee.Address arg3,
                                      int arg4)
Specified by:
eventProcessingSuccessful in interface javax.slee.resource.ResourceAdaptor

getActivity

public java.lang.Object getActivity(javax.slee.resource.ActivityHandle arg0)
Specified by:
getActivity in interface javax.slee.resource.ResourceAdaptor

getActivityHandle

public javax.slee.resource.ActivityHandle getActivityHandle(java.lang.Object arg0)
Specified by:
getActivityHandle in interface javax.slee.resource.ResourceAdaptor

getMarshaler

public javax.slee.resource.Marshaler getMarshaler()
Specified by:
getMarshaler in interface javax.slee.resource.ResourceAdaptor

getSBBResourceAdaptorInterface

public java.lang.Object getSBBResourceAdaptorInterface(java.lang.String arg0)
Specified by:
getSBBResourceAdaptorInterface in interface javax.slee.resource.ResourceAdaptor

queryLiveness

public void queryLiveness(javax.slee.resource.ActivityHandle arg0)
Specified by:
queryLiveness in interface javax.slee.resource.ResourceAdaptor

serviceActivated

public void serviceActivated(java.lang.String arg0)
Specified by:
serviceActivated in interface javax.slee.resource.ResourceAdaptor

serviceDeactivated

public void serviceDeactivated(java.lang.String arg0)
Specified by:
serviceDeactivated in interface javax.slee.resource.ResourceAdaptor

serviceInstalled

public void serviceInstalled(java.lang.String arg0,
                             int[] arg1,
                             java.lang.String[] arg2)
Specified by:
serviceInstalled in interface javax.slee.resource.ResourceAdaptor

serviceUninstalled

public void serviceUninstalled(java.lang.String arg0)
Specified by:
serviceUninstalled in interface javax.slee.resource.ResourceAdaptor

getPersistanceUnitName

public java.lang.String getPersistanceUnitName()

setPersistenceUnitName

public void setPersistenceUnitName(java.lang.String name)

addActivity

public void addActivity(SbbEntityManagerImpl em)
Specified by:
addActivity in interface ActivityManipulation

removeActivity

public void removeActivity(SbbEntityManagerImpl em)
Specified by:
removeActivity in interface ActivityManipulation

subscribeForEntityManagerFactoryForPU

public javax.persistence.EntityManagerFactory subscribeForEntityManagerFactoryForPU(java.lang.String puName,
                                                                                    java.util.Map emfProperties)
Description copied from interface: ActivityManipulation
This method notifies that someone is interesetd in using EMF for particular PU. Call of this method Either returns previosuly present EMF or creates new one using passed emfProperties.

Specified by:
subscribeForEntityManagerFactoryForPU in interface ActivityManipulation
Parameters:
puName - - name of persistence unit for which Entity\ManagerFactory will be created.
emfProperties - - map of propererties used to create EMF if none is present. If EMF is present it is ignored. This always can be set to null
Returns:
EMF

unsubscribeForEntityManagerFactoryForPU

public void unsubscribeForEntityManagerFactoryForPU(java.lang.String puName)
Description copied from interface: ActivityManipulation
Notifies that soemone is no longer interesetd in using EMF for certain PU.

Specified by:
unsubscribeForEntityManagerFactoryForPU in interface ActivityManipulation
Parameters:
puName - - name of persistence unit.

isEMFOpen

public boolean isEMFOpen(java.lang.String puName)
Description copied from interface: ActivityManipulation
Checks wheather EMF is present, and if it is, it checks if its open.

Specified by:
isEMFOpen in interface ActivityManipulation
Parameters:
puName - - name of persistence unit.
Returns:


Copyright © 2009. All Rights Reserved.