org.apache.ojb.odmg
Class PBCapsule

java.lang.Object
  extended byorg.apache.ojb.odmg.PBCapsule

public final class PBCapsule
extends java.lang.Object

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 (HasBroker Interface), else we try to obtain a broker using the given PBKey directly from the PBF.

Author:
Armin Waibel

Field Summary
(package private)  PersistenceBroker broker
           
(package private)  boolean isIlleagal
           
(package private)  boolean needsPBCommit
           
(package private)  boolean needsTxCommit
           
(package private)  PBKey pbKey
           
(package private)  Transaction tx
           
 
Constructor Summary
PBCapsule(PBKey pbKey, Transaction tx)
           
 
Method Summary
 void destroy()
           
 PersistenceBroker getBroker()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

broker

PersistenceBroker broker

pbKey

PBKey pbKey

tx

Transaction tx

needsTxCommit

boolean needsTxCommit

needsPBCommit

boolean needsPBCommit

isIlleagal

boolean isIlleagal
Constructor Detail

PBCapsule

public PBCapsule(PBKey pbKey,
                 Transaction tx)
Method Detail

getBroker

public PersistenceBroker getBroker()

destroy

public void destroy()


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