Package org.exolab.jms.tools.migration.master

Examples of org.exolab.jms.tools.migration.master.MasterMessageStore


        _database.start();

        // init master stores
        MasterDestinationStore masterDestinations
                = new MasterDestinationStore(_database);
        MasterMessageStore masterMessages = new MasterMessageStore(_database);
        MasterConsumerStore masterConsumers
                = new MasterConsumerStore(_database);
        MasterUserStore masterUsers = new MasterUserStore(_database);

        // init proxy stores
        PropertyStore properties = new PropertyStore(source);
        VersionInfo info = new VersionInfo(properties);
        String schemaVersion = info.getProxySchemaVersion();
        if (schemaVersion == null || !schemaVersion.equals("1.0")) {
            throw new PersistenceException("Cannot import data: unsupported schema version: "
                                           + schemaVersion);
        }
        Date created = new Date(info.getCreationTimestamp());
        _log.info("Importing data created on " + created + " by OpenJMS "
                  + info.getOpenJMSVersion());

        DestinationStore destinations = new DestinationStore(source);
        ConsumerStore consumers = new ConsumerStore(destinations, source);
        MessageStore messages = new MessageStore(destinations, source);
        UserStore users = new UserStore(source);

        // import data from the proxy database to the master database
        _log.info("Importing destinations...");
        apply(destinations, masterDestinations);
        _log.info("Imported " + masterDestinations.size() + " destinations");

        _log.info("Importing messages...");
        apply(messages, masterMessages);
        _log.info("Imported " + masterMessages.size() + " messages");

        _log.info("Importing consumers...");
        apply(consumers, new MasterConsumerStore(_database));
        _log.info("Imported " + masterConsumers.size() + " consumers");
View Full Code Here

TOP

Related Classes of org.exolab.jms.tools.migration.master.MasterMessageStore

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.