Examples of DSSettings

http://purl.org/skytwenty/regperson.owl#Location/http://purl.org/skytwenty/regperson.owl#Location/http%3A%2F%2Fpurl.org%2Fskytwenty%2Fregperson.owl%23OpenIDRegisteredPerson%2Fhttp%253A%252F%252Fwww.google.com%252Fprofiles%252FTreasureCorpIsland%252F_ANY_Midp21+Device_84766997133853%2F @author uoccou @author Michael Grove @since 0.7 @version 0.7

Examples of com.clarkparsia.empire.sql.DSSettings

     */
    private DataSource createLocalDS(String unitName, String dsName, Map<String, Object> theConfig) {
        DataSource ds = nameSdbDsCache.get(dsName);

        if (ds == null) {
            DSSettings config = new DSSettings(dsName);

            if (theConfig.containsKey(dsName + ".url")) {
                config.setUrl(theConfig.get(dsName + ".url").toString());
            }
            if (theConfig.containsKey(dsName + ".db")) {
                config.setDb(theConfig.get(dsName + ".db").toString());
            }
            if (theConfig.containsKey(dsName + ".driver")) {
                config.setDriver(theConfig.get(dsName + ".driver").toString());
            }
            if (theConfig.containsKey(dsName + ".user")) {
                config.setUser(theConfig.get(dsName + ".user").toString());
            }
            if (theConfig.containsKey(dsName + ".password")) {
                config.setPassword(theConfig.get(dsName + ".password").toString());
            }
            if (theConfig.containsKey(dsName + ".autocommit")) {
                config.setAutocommit(theConfig.get(dsName + ".autocommit").toString());
            }
            if (theConfig.containsKey(dsName + ".isolation")) {
                config.setIsolation(theConfig.get(dsName + ".isolation").toString());
            }
            if (theConfig.containsKey(dsName + ".maxActive")) {
                config.setMaxActive(theConfig.get(dsName + ".maxActive").toString());
            }
            if (theConfig.containsKey(dsName + ".maxIdle")) {
                config.setMaxIdle(theConfig.get(dsName + ".maxIdle").toString());
            }
            if (theConfig.containsKey(dsName + ".maxWait")) {
                config.setMaxWait(theConfig.get(dsName + ".maxWait").toString());
            }

            //create the data source and bind the context name
            //@TODO : what if context name already exists in context ?
            try {
                ds = config.c3po().build();
            }
            catch (NamingException ne) {
                LOGGER.error("Cant get local Datasource of name '" + dsName + "' for config unit '" + unitName);
                LOGGER.error("There will be connection and SQL exceptions !");
            }
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.