Package org.ow2.easybeans.tests.common.db

Examples of org.ow2.easybeans.tests.common.db.TableManager.insertTable()


     * @throws SQLException if a database error occurs.
     */
    public void createTableWithAppException(final String dbName) throws NamingException, NotSupportedException,
            SystemException, SQLException {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(TABLE);
        throw new CustomException01("The bean threw an application exception defined in the deployment descriptor.");
    }

    /**
     * Inserts a table in the database and after throws an exception that is
View Full Code Here


     *         deployment descriptor, it is always thrown.
     */
    public void createTableWithAppExceptionAndRollback(final String dbName) throws NamingException,
            NotSupportedException, SystemException, SQLException, CustomException00 {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(TABLE);
        throw new CustomException00("The bean threw an application exception defined in the deployment descriptor.");
    }

    /**
     * Inserts a table in the database and after throws an exception that is
View Full Code Here

     * @throws SQLException if a database error occurs.
     */
    public void createTableWithAppExceptionDefault(final String dbName) throws NamingException, NotSupportedException,
            SystemException, SQLException {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(TABLE);
        throw new IllegalException("The bean threw an application exception defined in the deployment descriptor.");
    }

    /**
     * Inserts a table in the database and after throws an exception that is
View Full Code Here

     *         the deployment descriptor, it is always thrown.
     */
    public void createTableWithAppExceptionOverride(final String dbName) throws NamingException, NotSupportedException,
            SystemException, SQLException, RollbackApplicationException {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(TABLE);
        throw new RollbackApplicationException("The bean threw an application exception defined by annotation.");
    }

}
View Full Code Here

        // starts the transaction
        utx.begin();
        // creates a table in the second database
        ItfDatabaseManager slsbDatabaseManager = EJBHelper.getBeanRemoteInstance(SLSBDatabaseManager.class,
                ItfDatabaseManager.class);
        slsbDatabaseManager.insertTable(DATABASE_2, ItfContainerTransaction.TABLE);
        /*
         * Calls a bean method that forces an error and makes a roll back in the
         * method. The bean is using a required new attribute, so the bean
         * cannot use the same transaction that the client.
         */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.