Package com.cloudhopper.commons.sql.adapter

Examples of com.cloudhopper.commons.sql.adapter.DataSourceAdapter


        // get the class responsible for creating the datasource
        String adapterClass = config.getProvider().getAdapter();

        // create a new instance of the adapter
        DataSourceAdapter adapter = null;
        try {
            adapter = (DataSourceAdapter)Class.forName(adapterClass).newInstance();
        } catch (Exception e) {
            //throw new SQLConfigurationException("Invalid DataSourceAdapter class specified. Should be impossible error?");
            throw new SQLMissingDependencyException("DataSourceAdapter '" + adapterClass + "' failed to load. Perhaps missing jar file?", e);
        }

        // delegate creating the new datasource to the adapter
        ManagedDataSource mds = adapter.create(config);

        // if the user requested this datasource to be added to jmx
        if (config.getJmx()) {
            // hmm... if jmx is turned on, let's register the MBean
            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
View Full Code Here

TOP

Related Classes of com.cloudhopper.commons.sql.adapter.DataSourceAdapter

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.