|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.osgi.util.tracker.ServiceTracker
org.apache.aries.jpa.container.context.impl.PersistenceContextManager
public class PersistenceContextManager
This class is responsible for managing all of the persistence contexts at a defined scope, i.e. for a single framework or composite. It will automatically manage the lifecycle of all registered persistence contexts.
| Field Summary |
|---|
| Fields inherited from class org.osgi.util.tracker.ServiceTracker |
|---|
context |
| Constructor Summary | |
|---|---|
PersistenceContextManager(org.osgi.framework.BundleContext ctx,
JTAPersistenceContextRegistry registry)
Create a new PersistenceContextManager at a scope defined by the supplied BundleContext |
|
| Method Summary | |
|---|---|
Object |
addingService(org.osgi.framework.ServiceReference reference)
|
void |
close()
|
void |
open()
|
void |
quiesceAllUnits(DestroyCallback callback)
Quiesce all the persistence units managed by this PersistenceContextManager |
void |
quiesceUnits(org.osgi.framework.Bundle bundleToQuiesce,
DestroyCallback callback)
Call this method to quiesce a given bundle |
void |
registerContext(String name,
org.osgi.framework.Bundle client,
HashMap<String,Object> properties)
Register a persistence context definition with this manager |
void |
removedService(org.osgi.framework.ServiceReference ref,
Object o)
|
void |
unregisterContext(String name,
org.osgi.framework.Bundle client)
Unregister the supplied bundle as a client of the supplied persistence context |
| Methods inherited from class org.osgi.util.tracker.ServiceTracker |
|---|
getService, getService, getServiceReference, getServiceReferences, getServices, getTrackingCount, modifiedService, open, remove, size, waitForService |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistenceContextManager(org.osgi.framework.BundleContext ctx,
JTAPersistenceContextRegistry registry)
BundleContext
ctx - the bundle context to use for tracking services. In order to prevent this
object becoming prematurely invalid it is best to use the BundleContext of
the system bundle (Bundle 0).| Method Detail |
|---|
public void close()
close in class org.osgi.util.tracker.ServiceTrackerpublic Object addingService(org.osgi.framework.ServiceReference reference)
addingService in interface org.osgi.util.tracker.ServiceTrackerCustomizeraddingService in class org.osgi.util.tracker.ServiceTracker
public void removedService(org.osgi.framework.ServiceReference ref,
Object o)
removedService in interface org.osgi.util.tracker.ServiceTrackerCustomizerremovedService in class org.osgi.util.tracker.ServiceTracker
public void registerContext(String name,
org.osgi.framework.Bundle client,
HashMap<String,Object> properties)
name - The name of the persistence unit for this contextclient - The Bundle that uses this persistence contextproperties - The Map of properties for this persistence context
This must contain the PersistenceContextType
public void unregisterContext(String name,
org.osgi.framework.Bundle client)
name - The name of the contextclient - The bundle that is using the persistence contextpublic void open()
open in class org.osgi.util.tracker.ServiceTracker
public void quiesceUnits(org.osgi.framework.Bundle bundleToQuiesce,
DestroyCallback callback)
bundleToQuiesce - The bundle to quiescecallback - A callback indicating that we have finished quiescingpublic void quiesceAllUnits(DestroyCallback callback)
PersistenceContextManager
callback -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||