Examples of TransactionNotInProgressException


Examples of org.exolab.castor.jdo.TransactionNotInProgressException

        ClassMolder     handler;
        Object           object;
       
        // Make sure transaction is still open.
        if (_tx.getStatus() != Status.STATUS_ACTIVE) {
            throw new TransactionNotInProgressException(Messages
                    .message("persist.noTransaction"));
        }
        if (_lastIdentity == null) {
            throw new IllegalStateException(Messages.message("jdo.fetchNoNextIdentity"));
        }
View Full Code Here

Examples of org.exolab.castor.jdo.TransactionNotInProgressException

    public void lock( Object object )
        throws LockNotGrantedException, ObjectNotPersistentException,
               TransactionNotInProgressException,  PersistenceException
    {
        if ( _ctx == null || ! _ctx.isOpen() )
            throw new TransactionNotInProgressException( Messages.message( "jdo.txNotInProgress" ) );
        _ctx.writeLock( object, _lockTimeout );
    }
View Full Code Here

Examples of org.exolab.castor.jdo.TransactionNotInProgressException

        throws TransactionNotInProgressException
    {
        TransactionContext tx;
       
        if ( _scope == null )
            throw new TransactionNotInProgressException( Messages.message( "jdo.dbClosed" ) );
        if ( _ctx != null && _ctx.isOpen()  )
            return _ctx;
        throw new TransactionNotInProgressException( Messages.message( "jdo.dbTxNotInProgress" ) );
    }
View Full Code Here

Examples of org.exolab.castor.jdo.TransactionNotInProgressException

        if ( _transaction != null )
            throw new IllegalStateException( Messages.message( "jdo.txInJ2EE" ) );

        if ( _ctx == null || ! _ctx.isOpen() )
            throw new TransactionNotInProgressException( Messages.message( "jdo.txNotInProgress" ) );
        if ( _ctx.getStatus() == Status.STATUS_MARKED_ROLLBACK )
            throw new TransactionAbortedException( Messages.message( "jdo.txAborted" ) );
        try {
            _ctx.prepare();
            _ctx.commit();
View Full Code Here

Examples of org.exolab.castor.jdo.TransactionNotInProgressException

        if ( _transaction != null )
            throw new IllegalStateException( Messages.message( "jdo.txInJ2EE" ) );

        // If inside XA transation throw IllegalStateException
        if ( _ctx == null || ! _ctx.isOpen() )
            throw new TransactionNotInProgressException( Messages.message( "jdo.txNotInProgress" ) );
        _ctx.rollback();
        _ctx = null;
    }
View Full Code Here

Examples of org.exolab.castor.jdo.TransactionNotInProgressException

    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;
View Full Code Here

Examples of org.exolab.castor.jdo.TransactionNotInProgressException

        ClassMolder     handler;
        Object           object;
       
        // Make sure transaction is still open.
        if ( _tx.getStatus() != Status.STATUS_ACTIVE )
            throw new TransactionNotInProgressException( Messages.message( "persist.noTransaction" ) );
        if ( _lastIdentity == null )
            throw new IllegalStateException( Messages.message( "jdo.fetchNoNextIdentity" ) );

        handler = _engine.getClassMolder( _query.getResultType() );
View Full Code Here

Examples of org.odmg.TransactionNotInProgressException

    private void checkOpen()
    {
        if (!isOpen())
        {
            throw new TransactionNotInProgressException(
                    "Transaction was not open, call tx.begin() before perform action, current status is: " +
                    TxUtil.getStatusString(getStatus()));
        }
    }
View Full Code Here

Examples of org.odmg.TransactionNotInProgressException

         * Is Tx open? ODMG 3.0 says it has to be to call bind.
         */
        TransactionImpl tx = getTransaction();
        if (tx == null || !tx.isOpen())
        {
            throw new TransactionNotInProgressException("Tx is not open. Must have an open TX to call bind.");
        }

        tx.getNamedRootsMap().bind(object, name);
    }
View Full Code Here

Examples of org.odmg.TransactionNotInProgressException

         * Is Tx open? ODMG 3.0 says it has to be to call bind.
         */
        TransactionImpl tx = getTransaction();
        if (tx == null || !tx.isOpen())
        {
            throw new TransactionNotInProgressException("Tx is not open. Must have an open TX to call lookup.");
        }

        return tx.getNamedRootsMap().lookup(name);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.