code: public PersistenceBrokerInternal getBrokerInternal()
      {
          if (broker == null || broker.isClosed())
          {
              checkOpen();
              try
              {
                  checkForDB();
                  broker = PersistenceBrokerFactoryFactory.instance().createPersistenceBroker(curDB.getPBKey());
              }
              catch (PBFactoryException e)
              {
                  log.error("Cannot obtain PersistenceBroker from PersistenceBrokerFactory, " +
                          "found PBKey was " + curDB.getPBKey(), e);
                  throw new PersistenceBrokerException(e);
              }
          }
          return broker;
      }
docs: Gets the broker associated with the transaction.
  MBAIRD: only return the associated broker if the transaction is open,
  if it's closed, throw a TransactionNotInProgressException. If we allow
  brokers to be reaquired by an already closed transaction, there is a
  very good chance the broker will be leaked as the doClose() method of
  transactionImpl will never be called and thus the broker will never
  be closed and returned to the pool.
  @return Returns a PersistenceBroker
  @throws TransactionNotInProgressException is the transaction is not open;