Package org.odmg

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.");
        }

        Identity identity = new Identity(object, tx.getBroker());
        // mark object as persistent first
        this.makePersistent(object);
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.");
        }

        Identity oid = nrm.get(name);
        // if not found in persistent table, lookup transaction temporay table
        if (oid == null)
View Full Code Here

         * Is Tx open? ODMG 3.0 says it has to be 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 unbind.");
        }
        boolean failedPersistent = false;
        boolean failedCurrentTx = false;

        // to make nrm entries visible during running transactions, transactions maintain
View Full Code Here

         * 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

    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.");
        }

        Identity identity = new Identity(object, tx.getBroker());
        // mark object as persistent first
        this.makePersistent(object);
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.");
        }

        Identity oid = nrm.get(name);
        // if not found in persistent table, lookup transaction temporay table
        if (oid == null)
View Full Code Here

         * Is Tx open? ODMG 3.0 says it has to be 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 unbind.");
        }
        boolean failedPersistent = false;
        boolean failedCurrentTx = false;

        // to make nrm entries visible during running transactions, transactions maintain
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.