Package org.wso2.carbon.utils.dbcreator

Examples of org.wso2.carbon.utils.dbcreator.DatabaseCreator


        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here


        ds.setMinIdle(5);
        //ds.setDriverClassName("net.sf.log4jdbc.DriverSpy");


        //DerbyDatabaseCreator creator = new DerbyDatabaseCreator(ds);
        DatabaseCreator creator = new DatabaseCreator(ds);
        try {
             creator.createRegistryDatabase();
        } catch (Exception e) {
             fail("Failed to create database. Caused by: " + e.getMessage());
        }
    //String fileName = "target/db/registry";
    //File file = new File(fileName);
View Full Code Here

    }

    private void initializeDatabase(DataSource ds) throws Exception {
        String value = System.getProperty("setup");
        if (value != null) {
            DatabaseCreator databaseCreator = new DatabaseCreator(ds);
            try {
                if (!databaseCreator.isDatabaseStructureCreated(DB_CHECK_SQL)) {
                    databaseCreator.createRegistryDatabase();
                } else {
                    log.info("Database already exists. Not creating a new database.");
                }
            } catch (Exception e) {
                String msg = "Error in creating the database";
View Full Code Here

        }

        BasicDataSource ds = new BasicDataSource();
        ds.setDriverClassName(SocialImplTestConstants.DB_DRIVER);
        ds.setUrl(TEST_URL);
        DatabaseCreator creator = new DatabaseCreator(ds);
        creator.createRegistryDatabase();

        realm = new DefaultRealm();
        InputStream inStream = this.getClass().getClassLoader().getResource(
                PersonManagerImplTest.JDBC_TEST_USERMGT_XML).openStream();
        RealmConfiguration realmConfig = TestRealmConfigBuilder
View Full Code Here

        BasicDataSource ds = new BasicDataSource();
        ds.setDriverClassName(UserCoreTestConstants.DB_DRIVER);
        ds.setUrl("jdbc:h2:target/Tenanttest/TEN_TEST");

        DatabaseCreator creator = new DatabaseCreator(ds);
        creator.createRegistryDatabase();
        tenantMan = new JDBCTenantManager(ds, "super.com");
    }
View Full Code Here

        ds = new BasicDataSource();
        ds.setDriverClassName(UserCoreTestConstants.DB_DRIVER);
        ds.setUrl("jdbc:h2:target/proftest/CARBON_TEST");

        DatabaseCreator creator = new DatabaseCreator(ds);
        creator.createRegistryDatabase();
    }
View Full Code Here

    public DAOManager getDAOManager() {
        return daoManager;
    }

    public void createDatabase() throws RegistryException {
        DatabaseCreator databaseCreator = new DatabaseCreator(getDataSource());

        try {
            databaseCreator.createRegistryDatabase();
        } catch (Exception e) {
            String msg = "Error in creating the database";
            throw new RegistryException(msg, e);
        }
    }
View Full Code Here

        String connectionUrl = "jdbc:h2:" + derbyDBName;
        dataSource.setUrl(connectionUrl);
        dataSource.setDriverClassName("org.h2.Driver");

        try {
            DatabaseCreator creator = new DatabaseCreator(dataSource);
            creator.createRegistryDatabase();
            RealmConfigXMLProcessor builder = new RealmConfigXMLProcessor();
            InputStream inStream = new FileInputStream(
                    "src/test/resources/user-test/user-mgt-registry-test.xml");
            try {
                bootstrapRealmConfig = builder.buildRealmConfiguration(inStream);
View Full Code Here

        BasicDataSource ds = new BasicDataSource();
        ds.setDriverClassName(UserCoreTestConstants.DB_DRIVER);
        ds.setUrl("jdbc:h2:target/HybridRoleTest/CARBON_TEST");

        DatabaseCreator creator = new DatabaseCreator(ds);
        creator.createRegistryDatabase();
        // taking the tenant id = 0
     //   hybridRoleMan = new HybridRoleManager(ds, 0);
    }
View Full Code Here

        BasicDataSource ds = new BasicDataSource();
        ds.setDriverClassName(UserCoreTestConstants.DB_DRIVER);
        ds.setUrl("jdbc:h2:target/hybridroletest/UM_ADV_TEST");

        DatabaseCreator creator = new DatabaseCreator(ds);
        creator.createRegistryDatabase();
//       hybridRoleMan = new HybridRoleManager(ds, 0);
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.utils.dbcreator.DatabaseCreator

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.