org.apache.ojb.broker.core
Class PersistenceBrokerFactorySyncImpl

java.lang.Object
  extended byorg.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl
      extended byorg.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
          extended byorg.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
All Implemented Interfaces:
org.apache.ojb.broker.util.configuration.Configurable, PersistenceBrokerFactoryIF

public class PersistenceBrokerFactorySyncImpl
extends PersistenceBrokerFactoryDefaultImpl

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 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 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.

Version:
$Id: PersistenceBrokerFactorySyncImpl.java,v 1.2 2004/02/18 19:39:59 arminw Exp $
Author:
Armin Waibel

Nested Class Summary
static class PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl
           
 
Constructor Summary
PersistenceBrokerFactorySyncImpl()
           
 
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, createPersistenceBroker, defaultPersistenceBroker, getDefaultKey, setDefaultKey
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceBrokerFactorySyncImpl

public PersistenceBrokerFactorySyncImpl()


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14