Package org.castor.cpa.test.framework.xml

Examples of org.castor.cpa.test.framework.xml.Database


            _configurations.put(config.getName(), config);
        }
       
        Iterator dbIter = cpactfconf.iterateDatabase();
        while (dbIter.hasNext()) {
            Database database = (Database) dbIter.next();
            _databases.put(database.getName(), database);
        }
       
        Iterator transIter = cpactfconf.iterateTransaction();
        while (transIter.hasNext()) {
            Transaction trans = (Transaction) transIter.next();
View Full Code Here


    public DatabaseEngineType getEngine(final String db) {
        if (!_databases.containsKey(db)) {
            throw new CPAConfigException("Database config '" + db + "' not found.");
        }

        Database database = _databases.get(db);
       
        if (database.getEngine() == null) {
            throw new CPAConfigException("No engine specified "
                    + "in database config '" + db + "'.");
        }
       
        return database.getEngine();
    }
View Full Code Here

        return mappings;
    }
   
    private org.castor.jdo.conf.Database createDatabase(
            final String name, final String db, final String[] mappings) {
        Database database = _databases.get(db);
       
        if (database.getEngine() == null) {
            throw new CPAConfigException("No engine specified "
                    + "in database config '" + db + "'.");
        }
        String engine = database.getEngine().toString();
       
        DatabaseChoice choice = database.getDatabaseChoice();
        if (choice == null) {
            throw new CPAConfigException("Neither driver, datasource nor jndi specified "
                    + "in database config '" + db + "'.");
        }
       
View Full Code Here

TOP

Related Classes of org.castor.cpa.test.framework.xml.Database

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.