public class PersistenceBrokerThreadMapping
extends java.lang.Object
Constructor and Description |
---|
PersistenceBrokerThreadMapping() |
Modifier and Type | Method and Description |
---|---|
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
|
public static void setCurrentPersistenceBroker(PBKey key, PersistenceBrokerInternal broker) throws PBFactoryException
key
- The PBKey the broker is associated tobroker
- The PersistenceBroker to mark as currentPBFactoryException
public static void unsetCurrentPersistenceBroker(PBKey key, PersistenceBrokerInternal broker) throws PBFactoryException
key
- The PBKey the broker is associated tobroker
- The PersistenceBroker to unmarkPBFactoryException
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()
(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30