Package com.scooterframework.orm.sqldataexpress.exception

Examples of com.scooterframework.orm.sqldataexpress.exception.TransactionException


     */
    public void beginTransaction(String type) {
        Transaction tx = getTransaction();
       
        if (tx != null && tx.isTransactionStarted()) {
            throw new TransactionException("Failed in beginTransaction: transaction already started.");
        }
        else if (tx == null) {
            tx = TransactionFactory.getInstance().createTransaction(type);
            setTransaction(tx);
        }
View Full Code Here


          String transName = System.getProperty("jta.UserTransaction");
            try {
              ut = (UserTransaction) ctx.lookup(transName);
            }
            catch(Exception ex2) {
                throw new TransactionException("Failed to create UserTransaction by using either " +
                    Transaction.USER_TRANSACTION_JNDI_STRING +
                        "or System.getProperty for jta.UserTransaction '" +
                        transName + "'.", ex);
            }
        }
View Full Code Here

                if (UserDatabaseConnection.JDBC_CONNECTION.equals(udc.getConnectionType()))
                    DAOUtil.commit(udc.getConnection());
            }
        }
        catch(Exception ex) {
            throw new TransactionException("eroror in commit()", ex);
        }
    }
View Full Code Here

                if (UserDatabaseConnection.JDBC_CONNECTION.equals(udc.getConnectionType()))
                    DAOUtil.rollback(udc.getConnection());
            }
        }
        catch(Exception ex) {
            throw new TransactionException("eroror in rollback()", ex);
        }
    }
View Full Code Here

        try {
            Transaction ts = getTransactionManager().getTransaction();

            if (ts == null || !ts.isTransactionStarted())  {
                throw new TransactionException("getConnection() failed: no started transaction.");
            }

            conn = ts.getConnection();

            if (conn == null) throw new CreateConnectionFailureException("getConnection() failed to create a connection.");
View Full Code Here

        try {
            Transaction ts = getTransactionManager().getTransaction();

            if (ts == null || !ts.isTransactionStarted())  {
                throw new TransactionException("getConnection() failed: no started transaction.");
            }

            conn = ts.getConnection(connectionName);

            if (conn == null) throw new CreateConnectionFailureException("getConnection() failed to create a connection.");
View Full Code Here

        try {
            Transaction ts = getTransactionManager().getTransaction();

            if (ts == null || !ts.isTransactionStarted())  {
                throw new TransactionException("getConnection() failed: no started transaction.");
            }

            conn = ts.getConnection(dcc);

            if (conn == null) throw new CreateConnectionFailureException("getConnection() failed to create a connection.");
View Full Code Here

TOP

Related Classes of com.scooterframework.orm.sqldataexpress.exception.TransactionException

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.