|  1 |     | 
     | 
  |  2 |     | 
     | 
  |  3 |     | 
     | 
  |  4 |     | 
     | 
  |  5 |     | 
     | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |     | 
     | 
  |  11 |     | 
     | 
  |  12 |     | 
     | 
  |  13 |     | 
     | 
  |  14 |     | 
     | 
  |  15 |     | 
     | 
  |  16 |     | 
   package org.kuali.rice.kns.util;  | 
  |  17 |     | 
     | 
  |  18 |     | 
   import org.apache.log4j.Logger;  | 
  |  19 |     | 
   import org.apache.ojb.broker.PBKey;  | 
  |  20 |     | 
   import org.apache.ojb.broker.TransactionAbortedException;  | 
  |  21 |     | 
   import org.apache.ojb.broker.TransactionInProgressException;  | 
  |  22 |     | 
   import org.apache.ojb.broker.TransactionNotInProgressException;  | 
  |  23 |     | 
   import org.apache.ojb.broker.core.PersistenceBrokerFactoryIF;  | 
  |  24 |     | 
   import org.apache.ojb.broker.core.PersistenceBrokerImpl;  | 
  |  25 |     | 
     | 
  |  26 |     | 
   public class KualiPersistenceBrokerImpl extends PersistenceBrokerImpl { | 
  |  27 |    0 |        private static final Logger LOG = Logger.getLogger(KualiPersistenceBrokerImpl.class);  | 
  |  28 |     | 
     | 
  |  29 |     | 
     | 
  |  30 |    0 |        private boolean fresh = true;  | 
  |  31 |     | 
     | 
  |  32 |     | 
       public KualiPersistenceBrokerImpl(PBKey key, PersistenceBrokerFactoryIF pbf) { | 
  |  33 |    0 |            super(key, pbf);  | 
  |  34 |    0 |        }  | 
  |  35 |     | 
     | 
  |  36 |     | 
       public boolean isFresh() { | 
  |  37 |    0 |            return fresh;  | 
  |  38 |     | 
       }  | 
  |  39 |     | 
     | 
  |  40 |     | 
     | 
  |  41 |     | 
         | 
  |  42 |     | 
     | 
  |  43 |     | 
     | 
  |  44 |     | 
       public synchronized void beginTransaction() throws TransactionInProgressException, TransactionAbortedException { | 
  |  45 |    0 |            LOG.debug("beginning transaction for persistenceBroker " + getClass().getName() + "@" + hashCode()); | 
  |  46 |     | 
     | 
  |  47 |    0 |            super.beginTransaction();  | 
  |  48 |    0 |        }  | 
  |  49 |     | 
     | 
  |  50 |     | 
         | 
  |  51 |     | 
     | 
  |  52 |     | 
     | 
  |  53 |     | 
       public synchronized void abortTransaction() throws TransactionNotInProgressException { | 
  |  54 |    0 |            LOG.debug("aborting transaction for persistenceBroker " + getClass().getName() + "@" + hashCode()); | 
  |  55 |     | 
     | 
  |  56 |    0 |            super.abortTransaction();  | 
  |  57 |    0 |        }  | 
  |  58 |     | 
     | 
  |  59 |     | 
         | 
  |  60 |     | 
     | 
  |  61 |     | 
     | 
  |  62 |     | 
       public synchronized void commitTransaction() throws TransactionNotInProgressException, TransactionAbortedException { | 
  |  63 |    0 |            LOG.debug("committing transaction for persistenceBroker " + getClass().getName() + "@" + hashCode()); | 
  |  64 |     | 
     | 
  |  65 |    0 |            super.commitTransaction();  | 
  |  66 |    0 |        }  | 
  |  67 |     | 
     | 
  |  68 |     | 
         | 
  |  69 |     | 
     | 
  |  70 |     | 
     | 
  |  71 |     | 
       public boolean close() { | 
  |  72 |    0 |            LOG.debug("closing persistenceBroker " + getClass().getName() + "@" + hashCode()); | 
  |  73 |    0 |            fresh = false;  | 
  |  74 |     | 
     | 
  |  75 |    0 |            return super.close();  | 
  |  76 |     | 
       }  | 
  |  77 |     | 
   }  |