code: public void rollbackBreakIteration(List objectsToStore)
      {
          // now we mix up different api's and use PB-api too
          log.info("rollbackBreakIteration");
          /*
          store list of objects, then get these objects with Iterator, start
          iteration, then break
          */
          storeObjects(objectsToStore);
          TransactionExt tx = ((TransactionExt) getImplementation().currentTransaction());
          // force writing to DB
          tx.flush();
          Class searchClass = objectsToStore.get(0).getClass();
          PersistenceBroker broker = tx.getBroker();
          Query q = new QueryByCriteria(searchClass);
          // we get the iterator and step into the first found object
          Iterator it = broker.getIteratorByQuery(q);
          it.next();
          /*
          seems that some appServer expect that all used resources are closed before
          the JTA-TXManager does call Synchronization#beforeCompletion(), so we have
          to cleanup used resources. This could be done by call abort on odmg-api
          */
          getImplementation().currentTransaction().abort();
          // to notify the client about the failure we throw an exception
          // if we don't throw such an exception the client don't get notified
          // about the failure
          throw new EJBException("## Testing of rollback behaviour - rollbackBreakIteration ##");
      }
docs: We use several OJB services, start to iterate a query result and do
  an odmg-tx.abort call.
  
  @ejb:interface-method