public Object nextIdentity()
throws TransactionNotInProgressException, PersistenceException
{
// Make sure transaction is still open.
if ( _tx.getStatus() != Status.STATUS_ACTIVE )
throw new TransactionNotInProgressException( Messages.message( "persist.noTransaction" ) );
try {
_lastIdentity = _query.nextIdentity( _lastIdentity );
} catch ( PersistenceException except ) {
_lastIdentity = null;
throw except;