SimpleJtaTransactionManagerImpl.getInstance().begin();
Session s = openSession();
NumberedNode root = new NumberedNode( "root" );
NumberedNode child = new NumberedNode( "child" );
root.addChild( child );
s.saveOrUpdate( root );
s = applyNonFlushedChangesToNewSessionCloseOldSession( s );
root = ( NumberedNode ) getOldToNewEntityRefMap().get( root );
child = ( NumberedNode ) getOldToNewEntityRefMap().get( child );
SimpleJtaTransactionManagerImpl.getInstance().commit();