Package org.odmg

Examples of org.odmg.TransactionNotInProgressException


         * Is Tx open? ODMG 3.0 says it has to be to call makePersistent.
         */
        Transaction tx = getTransaction();
        if (tx == null || !tx.isOpen())
        {
            throw new TransactionNotInProgressException("No transaction in progress, cannot persist");
        }

        try
        {
            // check whether object's class is persistence capable
View Full Code Here


            throw new DatabaseClosedException("Database is not open");
        }
        TransactionImpl tx = getTransaction();
        if (tx == null || !tx.isOpen())
        {
            throw new TransactionNotInProgressException("No transaction in progress, cannot delete persistent");
        }
        tx.lock(object, Transaction.WRITE);
        tx.markDelete(object);
    }
View Full Code Here

            log.error("Obtain current transaction from container failed", e);
        }
        if (transaction == null)
        {
            log.error("Cannot get the external transaction from the external TM");
            throw new TransactionNotInProgressException("No external transaction found");
        }
        if (log.isDebugEnabled())
        {
            log.debug("registerSynchronization was called with parameters" +
                    "\n  J2EETransactionImpl: " + odmgTrans +
View Full Code Here

    public TransactionImpl getCurrentTransaction()
    {
        TransactionImpl retval = getTransaction();
        if (null == retval)
        {
            throw new TransactionNotInProgressException(
                    "Calling method needed transaction, but no transaction found via TransactionManager");
        }
        return retval;
    }
View Full Code Here

    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

        if (txStatus != Status.STATUS_ACTIVE && txStatus != Status.STATUS_PREPARED &&
                txStatus != Status.STATUS_MARKED_ROLLBACK)
        {
            if(txStatus == Status.STATUS_NO_TRANSACTION)
            {
                throw new TransactionNotInProgressException("The Transaction was not started, tx " + this);
            }
            else
            {
                throw new IllegalStateException("Illegal state for abort call, state was '" + TxUtil.getStatusString(txStatus) + "'");
            }
View Full Code Here

         * 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

         * 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

            throw new DatabaseClosedException("Database is not open. Must have an open DB to call unbind");
        }
        TransactionImpl tx = getTransaction();
        if (tx == null || !tx.isOpen())
        {
            throw new TransactionNotInProgressException("Tx is not open. Must have an open TX to call lookup.");
        }

        tx.getNamedRootsMap().unbind(name);
    }
View Full Code Here

         * Is Tx open? ODMG 3.0 says it has to be to call makePersistent.
         */
        TransactionImpl tx = getTransaction();
        if (tx == null || !tx.isOpen())
        {
            throw new TransactionNotInProgressException("No transaction in progress, cannot persist");
        }

//        RuntimeObject rt;
//        if(odmg.isSafeMode())
//        {
View Full Code Here

TOP

Related Classes of org.odmg.TransactionNotInProgressException

Copyright © 2018 www.massapicom. 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.