Workaround for participate the PB-api in JTA
javax.transaction.Transaction transaction by
implementing the
javax.transaction.Synchronization interface.
This may will be deprecated when we implemented a full JCA compliant connector.
When a new
org.apache.ojb.broker.PersistenceBroker instance is created in method
PersistenceBrokerFactorySyncImpl.wrapBrokerWithPoolingHandle the given PB instance is wrapped with
PersistenceBrokerSyncImpl before it was put to the PB-pool.
When a PB instance was requested class try to lookup the current JTA transaction in
PersistenceBrokerFactorySyncImpl.wrapRequestedBrokerInstance 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.
author: Armin Waibel version: $Id: PersistenceBrokerFactorySyncImpl.java,v 1.7.2.8 2005/12/21 22:25:01 tomdz Exp $
Inner Class :public static class PersistenceBrokerSyncImpl extends PoolablePersistenceBroker implements Synchronization
Inner Class :class TransactionBox implements Synchronization