Package com.volantis.mcs.repository.jdbc

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


        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);
View Full Code Here


        if (vendor == null || vendor.length() == 0) {
            throw new JDBCRepositoryException(
                    EXCEPTION_LOCALIZER.format("jdbc-missing-vendor"));
        }

        JDBCRepositoryType type = JDBCRepositoryType.getTypeForVendor(vendor);
        if (type == null) {
            throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
                    "jdbc-unknown-vendor", vendor));
        }

        return type.getVendor();
    }
View Full Code Here

     */
    private void ensureDriverClassesLoaded() {
        if (!driverClassesLoaded) {
            Iterator repositoryTypes = JDBCRepositoryType.iterator();
            while (repositoryTypes.hasNext()) {
                JDBCRepositoryType type = (JDBCRepositoryType)
                        repositoryTypes.next();
                try {
                    Class.forName(type.getDriverClassName());
                    if (LOGGER.isDebugEnabled()) {
                        LOGGER.debug("Loaded JDBC driver " +
                                type.getDriverClassName());
                    }
                } catch (ClassNotFoundException e) {
                    if (LOGGER.isDebugEnabled()) {
                        // Make this log on info so that we do not receive
                        // this every time we fail to find a driver - which
                        // will be almost all of the time. Use info so that
                        // we can use a localized message enabling the user
                        // to debug.
                        LOGGER.info("cannot-load-driver",
                                type.getDriverClassName());
                    }
                }
            }
            driverClassesLoaded = true;
        }
View Full Code Here

                        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");
View Full Code Here

TOP

Related Classes of com.volantis.mcs.repository.jdbc.JDBCRepositoryType

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.