Examples of DBManager


Examples of org.ow2.easybeans.tests.common.db.DBManager

                "org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory");
        // Adds new databases
        // Bind a PostgreSQL datasource
        if (BIND_POSTGRESQL) {
            try {
                new InitialContext().rebind("postgresql", new DBManager(createDefaultPostgreSQL()));
            } catch (NamingException e) {
                throw new EmbeddedException("Cannot start the PostgresSQL database.", e);
            } catch (ClassNotFoundException e) {
                throw new EmbeddedException("Cannot start the Postgres database.", e);
            }
        }
        // Bind a MySQL datasource
        if (BIND_MYSQL) {
            try {
                new InitialContext().rebind("mysql", new DBManager(createDefaultMySQL()));
            } catch (NamingException e) {
                throw new EmbeddedException("Cannot start the MySQL database.", e);
            } catch (ClassNotFoundException e) {
                throw new EmbeddedException("Cannot start the MySQL database.", e);
            }
        }

        // Bind a Oracle datasource
        if (BIND_ORACLE) {
            try {
                new InitialContext().rebind("oracle", new DBManager(createDefaultOracle()));
            } catch (NamingException e) {
                throw new EmbeddedException("Cannot start the Oracle database.", e);
            } catch (ClassNotFoundException e) {
                throw new EmbeddedException("Cannot start the Oracle database.", e);
            }
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.