Examples of MCSDriverConfiguration


Examples of com.volantis.mcs.repository.jdbc.MCSDriverConfiguration

    private LocalRepository createJDBCRepository()
        throws RepositoryException {

        JDBCRepositoryFactory factory =
                JDBCRepositoryFactory.getDefaultInstance();
        MCSDriverConfiguration driverConfiguration =
                factory.createMCSDriverConfiguration();
        driverConfiguration.setHost(args.getValue(HOST));
        String port = args.getValue(PORT);
        if (port != null) {
            driverConfiguration.setPort(Integer.parseInt(port));
        }
        JDBCRepositoryType repositoryType =
                JDBCRepositoryType.getTypeForVendor(args.getValue(VENDOR));
        driverConfiguration.setDriverVendor(repositoryType.getVendor());
        driverConfiguration.setSource(args.getValue(SOURCE));

        DataSource dataSource =
                factory.createMCSDriverDataSource(driverConfiguration);

        JDBCRepositoryConfiguration configuration =
View Full Code Here

Examples of com.volantis.mcs.repository.jdbc.MCSDriverConfiguration

        PropertyConfigurator.configure("log4j.properties");

        JDBCRepositoryFactory jdbcFactory =
                JDBCRepositoryFactory.getDefaultInstance();

        MCSDriverConfiguration driverConfiguration =
                jdbcFactory.createMCSDriverConfiguration();
        driverConfiguration.setDriverVendor(JDBCDriverVendor.ORACLE8);
        driverConfiguration.setHost("haddock");
        driverConfiguration.setPort(1526);
        driverConfiguration.setSource("DEV1");
        DataSource dataSource =
                jdbcFactory.createMCSDriverDataSource(driverConfiguration);

        JDBCRepositoryConfiguration jdbcConfiguration =
                jdbcFactory.createJDBCRepositoryConfiguration();
View Full Code Here

Examples of com.volantis.mcs.repository.jdbc.MCSDriverConfiguration

            throws RepositoryException {

        // Get the vendor string.
        JDBCDriverVendor vendor = getVendor(properties);

        MCSDriverConfiguration configuration =
                factory.createMCSDriverConfiguration();
        configuration.setDriverVendor(vendor);
        if (vendor != JDBCDriverVendor.HYPERSONIC) {
            configuration.setHost(getHost(properties));
            configuration.setPort(getPort(properties));
        }
        configuration.setSource(getSource(properties));

        MCSConnectionPoolConfiguration connectionPoolConfiguration =
                getConnectionPoolConfiguration(factory, properties);
        configuration.setConnectionPoolConfiguration(
                connectionPoolConfiguration);

        return factory.createMCSDriverDataSource(configuration);
    }
View Full Code Here

Examples of com.volantis.mcs.repository.jdbc.MCSDriverConfiguration

        InternalJDBCRepository repository = null;

        JDBCRepositoryFactory factory =
                JDBCRepositoryFactory.getDefaultInstance();
        MCSDriverConfiguration driverConfiguration =
                factory.createMCSDriverConfiguration();
        driverConfiguration.setDriverVendor(JDBCDriverVendor.HYPERSONIC);
        driverConfiguration.setSource(source);
        DataSource dataSource =
                factory.createMCSDriverDataSource(driverConfiguration);

        JDBCRepositoryConfiguration configuration =
                factory.createJDBCRepositoryConfiguration();
View Full Code Here

Examples of com.volantis.mcs.repository.jdbc.MCSDriverConfiguration

    public void testConstructURL() throws Exception {

        JDBCRepositoryFactory factory =
                JDBCRepositoryFactory.getDefaultInstance();

        MCSDriverConfiguration configuration =
                factory.createMCSDriverConfiguration();
        configuration.setHost("host");
        configuration.setPort(8086);
        configuration.setSource("source");

        VendorFactory vendorFactory = new DB2VendorFactory();

        assertEquals("URL with non-default port not as",
                     "jdbc:db2://host:8086/source",
                     vendorFactory.getDriverSpecificURL(configuration));

        configuration.setPort(50000);

        assertEquals("URL with default port not as",
                     "jdbc:db2://host/source",
                vendorFactory.getDriverSpecificURL(configuration));
    }
View Full Code Here

Examples of com.volantis.mcs.repository.jdbc.MCSDriverConfiguration

                // Default to JDBC.

                JDBCRepositoryFactory factory =
                        JDBCRepositoryFactory.getDefaultInstance();

                MCSDriverConfiguration driverConfiguration =
                        factory.createMCSDriverConfiguration();

                driverConfiguration.setSource(
                        Environment.getParameter(config, "odbc-source"));
                String vendor = Environment.getParameter(config, "odbc-vendor");
                JDBCRepositoryType jdbcRepositoryType =
                        JDBCRepositoryType.getTypeForVendor(vendor);
                if (jdbcRepositoryType != null) {
                    driverConfiguration.setDriverVendor(
                            jdbcRepositoryType.getVendor());
                }

                driverConfiguration.setHost(Environment.getParameter(config,
                        "odbc-host"));
                String port = Environment.getParameter(config, "odbc-port");
                if (port != null) {
                    driverConfiguration.setPort(Integer.parseInt(port));
                }

                DataSource dataSource = factory.createMCSDriverDataSource(
                        driverConfiguration);
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.