Package org.exolab.jms.tools.db

Examples of org.exolab.jms.tools.db.Database


    public V072toV076SchemaConverter(Connection connection) {
        _connection = connection;
    }

    public void convert() throws PersistenceException {
        Database schema = SchemaHelper.getSchema();
        try {
            if (_connection.getAutoCommit()) {
                _connection.setAutoCommit(false);
            }
            _tool = new RDBMSTool(_connection);
View Full Code Here


    public V061toV072SchemaConverter(Connection connection) {
        _connection = connection;
    }

    public void convert() throws PersistenceException {
        Database schema = SchemaHelper.getSchema();
        try {
            if (_connection.getAutoCommit()) {
                _connection.setAutoCommit(false);
            }
            _tool = new RDBMSTool(_connection);
View Full Code Here

     */
    private void init(Configuration config, boolean delete)
            throws PersistenceException {
        // init master tables
        RDBMSTool tool = new RDBMSTool(config);
        Database schema = SchemaHelper.getSchema();

        try {
            if (tool.hasTables(schema.getTable())) {
                if (delete) {
                    tool.delete(schema);
                } else {
                    throw new PersistenceException(
                            "Cannot import data: master database already exists "
View Full Code Here

        Configuration config = read("/openjmstest.xml");

        // ensure the tables don't exist
        EmbeddedDataSource ds = MigrationHelper.getDataSource(DB_NAME);
        RDBMSTool tool = new RDBMSTool(ds.getConnection());
        Database schema = MigrationHelper.getSchema();
        tool.drop(schema);
        assertFalse(tool.hasTables(schema.getTable()));

        // Create the exporter, and verify it has created the tables.
        new Exporter(config, DB_NAME, false);
        assertTrue(tool.hasTables(schema.getTable()));
    }
View Full Code Here

        Configuration config = read("/openjmstest.xml");

        // create the target database.
        EmbeddedDataSource ds = MigrationHelper.getDataSource(DB_NAME);
        RDBMSTool tool = new RDBMSTool(ds.getConnection());
        Database schema = MigrationHelper.getSchema();
        tool.drop(schema);
        tool.create(schema);

        // Create the exporter
        try {
View Full Code Here

        // load the configuration for the target master database 'migrated'
        Configuration config = read("/openjmstest_migrated.xml");

        // ensure the tables don't exist
        RDBMSTool tool = new RDBMSTool(config);
        Database schema = SchemaHelper.getSchema();
        tool.drop(schema);
        assertFalse(tool.hasTables(schema.getTable()));

        // Create the importer, and verify it has created the tables.
        new Importer(config, DB_NAME, false);
        assertTrue(tool.hasTables(schema.getTable()));
    }
View Full Code Here

        // load the configuration for the target master database 'migrated'
        Configuration config = read("/openjmstest_migrated.xml");

        // create the target database.
        RDBMSTool tool = new RDBMSTool(config);
        Database schema = SchemaHelper.getSchema();
        tool.drop(schema);
        tool.create(schema);
        tool.close();

        // Create the importer
View Full Code Here

TOP

Related Classes of org.exolab.jms.tools.db.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.