Package org.exolab.jms.config

Examples of org.exolab.jms.config.Configuration


                    EmbeddedDataSource dataSource = new EmbeddedDataSource();
                    dataSource.setDatabaseName(dbPath);
                    connection = dataSource.getConnection();

                } else {
                    Configuration config = ConfigurationReader.read(configPath);
                    DatabaseService dbService = new DatabaseService(config);
                    dbService.start();

                    PersistenceAdapter adapter = dbService.getAdapter();
                    connection = adapter.getConnection();
View Full Code Here


        if (path == null) {
            usage();
            System.exit(1);
        } else {
            try {
                Configuration config = ConfigurationReader.read(path);

                String database = commands.value("db");
                if (database == null) {
                    database = "openjms_migdb";
                }
View Full Code Here

                String configFile = cmdline.value("config");
                if (configFile == null) {
                    String home = getOpenJMSHome();
                    configFile = home + "/config/openjms.xml";
                }
                Configuration config = new ConfigurationLoader().load(configFile);
                String path = config.getLoggerConfiguration().getFile();
                if (path != null) {
                    DOMConfigurator.configure(path);
                }
                AdminConfiguration adminConfig = null;

                adminConfig = config.getAdminConfiguration();
                _serverStart = adminConfig.getScript();
                _serverConfig = adminConfig.getConfig();
                if (_serverConfig == null) {
                    _serverConfig = configFile;
                }
View Full Code Here

     *
     * @param path the path to an openjms XML configuration file
     * @throws PersistenceException if a connection cannot be established
     */
    public DBTool(String path) throws PersistenceException {
        Configuration config;
        try {
            config = ConfigurationReader.read(path);
        } catch (Exception exception) {
            throw new PersistenceException(exception.getMessage());
        }
        DOMConfigurator.configure(config.getLoggerConfiguration().getFile());
        init(config);
    }
View Full Code Here

     *
     * @throws Exception for any error
     */
    public void testExporterCreateTables() throws Exception {
        // load the configuration for the master database
        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();
View Full Code Here

     *
     * @throws Exception for any error
     */
    public void testExporterDelete() throws Exception {
        // load the configuration for the master database
        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();
View Full Code Here

     *
     * @throws Exception for any error
     */
    public void testImporterCreateTables() throws Exception {
        // 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);
View Full Code Here

     *
     * @throws Exception for any error
     */
    public void testImporterDelete() throws Exception {
        // 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);
View Full Code Here

     *
     * @throws Exception for any error
     */
    public void testRoundtrip() throws Exception {
        // load the configuration for the master database
        Configuration master = read("/openjmstest.xml");

        // export the data to a proxy database
        Exporter exporter = new Exporter(master, DB_NAME, true);
        exporter.apply();

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

        // import the data from the proxy database into 'migrated'
        Importer importer = new Importer(migrated, DB_NAME, true);
        importer.apply();

View Full Code Here

    }

    public static void main(String[] args) throws Exception {
        InputStream stream = DataLoader.class.getResourceAsStream(
                "/openjmstest.xml");
        Configuration config = ConfigurationReader.read(stream);
        DataLoader loader = new DataLoader(config);
        loader.load();
    }
View Full Code Here

TOP

Related Classes of org.exolab.jms.config.Configuration

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.