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

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


        TableManager cTest01 = new TableManager(ds05);
        try {
            // It must create twice the table, because each is in a different
            // database.
            cTest00.insertTable("ds04");
            cTest01.insertTable("ds04");

            cTest00.deleteTable("ds04");
            cTest01.deleteTable("ds04");
        } catch (Exception e) {
            throw new IllegalStateException("Exception: " + e.getMessage());
View Full Code Here


     * @throws NamingException if a lookup error occurs.
     */
    @TransactionAttribute(value = TransactionAttributeType.REQUIRED)
    public void insertTableWithRequired(final String dbName) throws SQLException, NamingException {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(TABLE);
    }

    /**
     * @see org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.transaction.ItfTransactionMisc00
     * @param dbName is the name of the database in the registry.
View Full Code Here

     * @throws NamingException if a lookup error occurs.
     */
    @TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED)
    public void insertTableWithNotSupported(final String dbName) throws SQLException, NamingException {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(TABLE);
    }

}
View Full Code Here

        UserTransaction utx = TransactionHelper.getUserTransaction();
        utx.begin();
        try {
            if (!callOnlyTransaction) {
                TableManager tableManager = new TableManager(dbName);
                tableManager.insertTable(TABLE);
            }
            utx.commit();
        } catch (Exception e) {
            utx.rollback();
            throw new TransactionException("Error during commit.", e);
View Full Code Here

            NamingException, SystemException, NotSupportedException {
        UserTransaction utx = TransactionHelper.getUserTransaction();
        utx.begin();
        if (!callOnlyTransaction) {
            TableManager tableManager = new TableManager(dbName);
            tableManager.insertTable(TABLE);
        }
    }

    /**
     * Makes a setRollbackOnly that must to throw en exception.
View Full Code Here

     * @param tableName is the table name.
     * @throws Exception if an error occurs.
     */
    protected void insertTable(final String dbName, final String tableName) throws Exception {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(tableName);
    }

    /**
     * Inserts a table the database. The transaction attribute is defined in the
     * deployment descriptor.
View Full Code Here

     * @param tableName is the table name.
     * @throws Exception if an error occurs.
     */
    protected void insertTable(final String dbName, final String tableName) throws Exception {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(tableName);
    }

    /**
     * Inserts a table the database. The transaction attribute is defined in the
     * deployment descriptor.
View Full Code Here

     * @throws SQLException if a databse error occurs.
     * @throws NamingException if a lookup error occurs.
     */
    private void insertTable(final String dbName) throws SQLException, NamingException {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(TABLE);
    }

    /**
     * Inserts the table test in the second database with the transaction
     * attribute MANDATORY.
View Full Code Here

     * @param dbName is the name of the database in the registry.
     * @throws Exception if an error occurs.
     */
    protected void insertTable(final String dbName) throws Exception {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(TABLE);
    }

    /**
     * Inserts the table test in both database.
     * @param db1 the name of the first database.
View Full Code Here

     * @throws NamingException if a lookup error occurs.
     * @throws SQLException if a database error occurs.
     */
    public void insertTable(final String dbName, final String tableName) throws NamingException, SQLException {
        TableManager tableManager = new TableManager(dbName);
        tableManager.insertTable(tableName);
    }

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