docs: public void beforeClose(PBStateEvent event)
      {
          /*
          arminw:
          this is a workaround for use in managed environments. When a PB instance is used
          within a container a PB.close call is done when leave the container method. This close
          the PB handle (but the real instance is still in use) and the PB listener are notified.
          But the JTA tx was not committed at
          this point in time and the session cache should not be cleared, because the updated/new
          objects will be pushed to the real cache on commit call (if we clear, nothing to push).
          So we check if the real broker is in a local tx (in this case we are in a JTA tx and the handle
          is closed), if true we don't reset the session cache.
          */
          if(!broker.isInTransaction())
          {
              if(log.isDebugEnabled()) log.debug("Clearing the session cache");
              resetSessionCache();
          }
      }