private void storePageTX(final Transaction tx) throws Exception {
   if (!stored) {
     tx.setContainsPersistent();
     pageTransaction.store(storageManager, pagingManager, tx);
     stored = true;
   }
 }
    @Override
    public void afterCommit(final Transaction tx) {
      // If part of the transaction goes to the queue, and part goes to paging, we can't let depage
      // start for the
      // transaction until all the messages were added to the queue
      // or else we could deliver the messages out of order

      if (pageTransaction != null) {
        pageTransaction.commit();
      }
    }
 @Override
 public void afterRollback(final Transaction tx) {
   if (pageTransaction != null) {
     pageTransaction.rollback();
   }
 }