Package org.odmg

Examples of org.odmg.DatabaseClosedException


        /**
         * Is the associated database non-null and open? ODMG 3.0 says it must be.
         */
        if ((curDB == null) || !curDB.isOpen())
        {
            throw new DatabaseClosedException("Database is not open. Must have an open DB to begin the Tx.");
        }
        if (isOpen())
        {
            log.error("Transaction is already open");
            throw new org.odmg.TransactionInProgressException("Impossible to call begin on already opened tx");
View Full Code Here


    public PBKey getPBKey()
    {
        if (pbKey == null)
        {
            log.error("## PBKey not set, Database isOpen=" + isOpen + " ##");
            if (!isOpen) throw new DatabaseClosedException("Database is not open");
        }
        return pbKey;
    }
View Full Code Here

        /**
         * is the DB open? ODMG 3.0 says we can't close an already open database.
         */
        if (!isOpen())
        {
            throw new DatabaseClosedException("Database is not Open. Must have an open DB to call close.");
        }
        /**
         * is the associated Tx open? ODMG 3.0 says we can't close the database with an open Tx pending.
         * check if a tx was found, the tx was associated with database
         */
 
View Full Code Here

        /**
         * Is DB open? ODMG 3.0 says it has to be to call bind.
         */
        if (!this.isOpen())
        {
            throw new DatabaseClosedException("Database is not open. Must have an open DB to call bind.");
        }
        /**
         * Is Tx open? ODMG 3.0 says it has to be to call bind.
         */
        TransactionImpl tx = getTransaction();
View Full Code Here

        /**
         * Is DB open? ODMG 3.0 says it has to be to call bind.
         */
        if (!this.isOpen())
        {
            throw new DatabaseClosedException("Database is not open. Must have an open DB to call lookup");
        }
        /**
         * Is Tx open? ODMG 3.0 says it has to be to call bind.
         */
        TransactionImpl tx = getTransaction();
View Full Code Here

        /**
         * Is DB open? ODMG 3.0 says it has to be to call unbind.
         */
        if (!this.isOpen())
        {
            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.");
View Full Code Here

        /**
         * Is DB open? ODMG 3.0 says it has to be to call makePersistent.
         */
        if (!this.isOpen())
        {
            throw new DatabaseClosedException("Database is not open");
        }
        /**
         * Is Tx open? ODMG 3.0 says it has to be to call makePersistent.
         */
        TransactionImpl tx = getTransaction();
View Full Code Here

     */
    public void deletePersistent(Object object)
    {
        if (!this.isOpen())
        {
            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");
View Full Code Here

     */
    public Transaction newTransaction()
    {
        if ((getCurrentDatabase() == null))
        {
            throw new DatabaseClosedException("Database is NULL, must have a DB in order to create a transaction");
        }
        TransactionImpl tx = new TransactionImpl(this);
        try
        {
            getConfigurator().configure(tx);
View Full Code Here

     */
    public Transaction currentTransaction()
    {
        if ((getCurrentDatabase() == null))
        {
            throw new DatabaseClosedException("Database is NULL, must have a DB in order to create a transaction");
        }
        return ojbTxManager.getTransaction();
    }
View Full Code Here

TOP

Related Classes of org.odmg.DatabaseClosedException

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.