org.apache.ojb.odmg
Class PBCapsule

java.lang.Object
  extended by org.apache.ojb.odmg.PBCapsule

public final class PBCapsule
extends java.lang.Object

ONLY VALID FOR READ OPERATIONS! Capsulates the way to obtain PersistenceBroker instances when a odmg-tx is running or not - Do not forget to call the destroy() method after use. When a transaction was found we use the PersistenceBroker instance shipped with the Transaction (via HasBroker), else we try to obtain a broker using the given PBKey directly from the PersistenceBrokerFactory.

Version:
$Id: PBCapsule.java 365262 2005-12-31 18:29:11Z arminw $

Constructor Summary
PBCapsule(PBKey pbKey, Transaction tx)
           
 
Method Summary
 void destroy()
           
 PersistenceBroker getBroker()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBCapsule

public PBCapsule(PBKey pbKey,
                 Transaction tx)
Method Detail

getBroker

public PersistenceBroker getBroker()

destroy

public void destroy()


(C) 2002 - 2006 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