Package org.odmg

Examples of org.odmg.TransactionNotInProgressException


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

        try
        {
            // if a ClassDescriptor was found, OJB knows how to persist the object
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.lockAndRegister(new RuntimeObject(object, tx), Transaction.WRITE, false);
        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

    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

    public TransactionImpl getCurrentTransaction()
    {
        TransactionImpl tx = (TransactionImpl) 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

         * 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.