|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.core.PersistenceBrokerThreadMapping
Helper class that tracks correspondence between PersistenceBroker instances and threads. The main task that this class solves is: to get current PersistenceBroker for the given thread. For internal use only.
Constructor Summary | |
PersistenceBrokerThreadMapping()
|
Method Summary | |
static PersistenceBrokerInternal |
currentPersistenceBroker(PBKey key)
Return the current open PersistenceBroker
instance for the given PBKey , if any. |
static void |
setCurrentPersistenceBroker(PBKey key,
PersistenceBrokerInternal broker)
Mark a PersistenceBroker as preferred choice for current Thread |
static void |
shutdown()
Clean up static fields and any registered ThreadLocal contents to grant a clean shutdown/reload of OJB within re/hot-deployable applications. |
static void |
unsetCurrentPersistenceBroker(PBKey key,
PersistenceBrokerInternal broker)
Unmark a PersistenceBroker as preferred choice for current Thread |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PersistenceBrokerThreadMapping()
Method Detail |
public static void setCurrentPersistenceBroker(PBKey key, PersistenceBrokerInternal broker) throws PBFactoryException
key
- The PBKey the broker is associated tobroker
- The PersistenceBroker to mark as current
PBFactoryException
public static void unsetCurrentPersistenceBroker(PBKey key, PersistenceBrokerInternal broker) throws PBFactoryException
key
- The PBKey the broker is associated tobroker
- The PersistenceBroker to unmark
PBFactoryException
public static PersistenceBrokerInternal currentPersistenceBroker(PBKey key) throws PBFactoryException, PersistenceBrokerException
PersistenceBroker
instance for the given PBKey
, if any.
key
-
PersistenceBroker
found.
PBFactoryException
PersistenceBrokerException
public static void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |