This is the default implementation of the
PersistenceBrokerFactoryIF interface.
This implementation use a pool of
org.apache.ojb.broker.PersistenceBroker instances [abbr. PB]. Each pooled PB instance (the implementation class was specified
in OJB configuration file) is wrapped by
PoolablePersistenceBroker class
before add to pool.
When calling
PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker or
PersistenceBrokerFactoryDefaultImpl.defaultPersistenceBroker the pooled-PB
instance (PoolablePersistenceBroker) on its part was wrapped with
PersistenceBrokerHandle handle.
When a client do a PB.close() call on the handle the wrapped PoolablePersistenceBroker will
be closed and returned to pool. All further method calls on the handle
(except PB.isClosed() and PB.isInTransaction()) result in an exception.
Each different
org.apache.ojb.broker.PBKey (based on PBKey.equals(...) method)
get its own PB-pool.
See Also: PersistenceBrokerFactoryBaseImpl author: Thomas Mahler author: Armin Waibel version: $Id: PersistenceBrokerFactoryDefaultImpl.java,v 1.11.2.4 2005/12/21 22:25:00 tomdz Exp $ |