Examples of DBSetup


Examples of org.rhq.core.db.setup.DBSetup

            upgradeFile.delete();
        }
    }

    private void setup() throws Exception {
        DBSetup dbSetup = new DBSetup(connection);

        File minimalSchema = getFileFromResource(MINIMAL_VERSION_OF_SCHEMA, getClass().getClassLoader());
        File currentSchema = getFileFromDbUtils("db-schema-combined.xml");
       
        try {
            replaceTokensInFile(minimalSchema);
            replaceTokensInFile(currentSchema);
            dbSetup.uninstall(currentSchema.getAbsolutePath());
            dbSetup.setup(minimalSchema.getAbsolutePath());
        } finally {
            minimalSchema.delete();
            currentSchema.delete();
        }

        File data = getFileFromResource(MINIMAL_VERSION_OF_DATA, getClass().getClassLoader());

        try {
            replaceTokensInFile(data);
            dbSetup.setup(data.getAbsolutePath(), null, true, false);
        } finally {
            data.delete();
        }
    }
View Full Code Here

Examples of org.rhq.helpers.perftest.support.dbsetup.DbSetup

            FileFormat format = state.format();

            Input input = format.getInput(streamProvider);

            try {
                DbSetup dbSetup = new DbSetup(jdbcConnection);
                dbSetup.setup(state.dbVersion());
                Importer.run(connection, input);
                dbSetup.upgrade(null);
            } finally {
                input.close();
            }
        } catch (Exception e) {
            LOG.warn("Failed to setup a database at [ " + dbUrl + "] for method '" + method.getTestMethod().getMethodName() + "'.", 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.