|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
Workaround for participate the PB-api in JTA transaction by
implementing the Synchronization interface.
This may will be deprecated when we implemented a full JCA compliant connector.
When a new PersistenceBroker instance is created in method wrapBrokerWithPoolingHandle(org.apache.ojb.broker.PersistenceBroker, org.apache.commons.pool.KeyedObjectPool)
the given PB instance is wrapped with PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl before it was put to the PB-pool.
When a PB instance was requested class try to lookup the current JTA transaction in
wrapRequestedBrokerInstance(org.apache.ojb.broker.PersistenceBroker) before the pooled PB instance was wrapped with the PB handle.
If a running tx was found the PB instance was registered with the transaction using the
Synchronization interface.
| Nested Class Summary | |
static class |
PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl
|
(package private) class |
PersistenceBrokerFactorySyncImpl.TransactionBox
This class collects all PB instances requested in the scope of one transaction |
(package private) class |
PersistenceBrokerFactorySyncImpl.TxRegistry
Maps all TransactionBox instances based on Transaction object identity. |
| Nested classes inherited from class org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl |
PersistenceBrokerFactoryDefaultImpl.PBKeyedPoolableObjectFactory |
| Constructor Summary | |
PersistenceBrokerFactorySyncImpl()
|
|
| Method Summary | |
protected PersistenceBroker |
wrapBrokerWithPoolingHandle(PersistenceBroker broker,
org.apache.commons.pool.KeyedObjectPool pool)
Each real pooled PersistenceBroker instance was wrapped by a
pooling handle when a new instance was created. |
protected PersistenceBroker |
wrapRequestedBrokerInstance(PersistenceBroker broker)
Wraps the requested pooled broker instance. |
| Methods inherited from class org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl |
activePersistenceBroker, createPersistenceBroker, getPoolConfiguration, releaseAllInstances, setPoolConfiguration |
| Methods inherited from class org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl |
configure, createNewBrokerInstance, createPersistenceBroker, defaultPersistenceBroker, getDefaultKey, setDefaultKey |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PersistenceBrokerFactorySyncImpl()
| Method Detail |
protected PersistenceBroker wrapBrokerWithPoolingHandle(PersistenceBroker broker,
org.apache.commons.pool.KeyedObjectPool pool)
PersistenceBrokerFactoryDefaultImplPersistenceBroker instance was wrapped by a
pooling handle when a new instance was created.
wrapBrokerWithPoolingHandle in class PersistenceBrokerFactoryDefaultImplbroker - real PersistenceBroker instancepool - use KeyedObjectPool
PoolablePersistenceBrokerprotected PersistenceBroker wrapRequestedBrokerInstance(PersistenceBroker broker)
PersistenceBrokerFactoryDefaultImpl
wrapRequestedBrokerInstance in class PersistenceBrokerFactoryDefaultImplbroker -
PersistenceBrokerHandle
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||