Package org.odmg

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


         * 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 = new RuntimeObject(object, getTransaction());
        tx.makePersistent(rt);
//        tx.moveToLastInOrderList(rt.getIdentity());
    }
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");
        }
        RuntimeObject rt = new RuntimeObject(object, tx);
        tx.deletePersistent(rt);
//        tx.moveToLastInOrderList(rt.getIdentity());
    }
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"
                    + SystemUtils.LINE_SEPARATOR +"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

    public TransactionImpl getCurrentTransaction()
    {
        TransactionImpl tx = tx_table.get(Thread.currentThread());
        if(tx == null)
        {
            throw new TransactionNotInProgressException("Calling method needed transaction, but no transaction found for current thread :-(");
        }
        return tx;
    }
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

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.