/*
store list of objects, then get these objects with Iterator, start
iteration, then break
*/
storeObjects(objects);
TransactionExt tx = ((TransactionExt) odmg.currentTransaction());
// force writing to DB
tx.flush();
Class searchClass = objects.get(0).getClass();
PersistenceBroker broker = tx.getBroker();
Query q = new QueryByCriteria(searchClass, new Criteria());
// we get the iterator and step into the first found object
Iterator it = broker.getIteratorByQuery(q);
it.next();
// now the iterator resources may not release, see what's going on