Package org.jasig.portal.rdbm.pool

Examples of org.jasig.portal.rdbm.pool.IPooledDataSourceFactory


           
            try {
                final Properties jdbpProperties = new Properties();
                jdbpProperties.load(jdbcPropStream);

                final IPooledDataSourceFactory pdsf = PooledDataSourceFactoryFactory.getPooledDataSourceFactory();

                final String driverClass = jdbpProperties.getProperty("jdbcDriver");
                final String username = jdbpProperties.getProperty("jdbcUser");
                final String password = jdbpProperties.getProperty("jdbcPassword");
                final String url = jdbpProperties.getProperty("jdbcUrl");
                boolean usePool = true;
                if (jdbpProperties.getProperty("jdbcUsePool")!=null)
                    usePool = Boolean.valueOf(jdbpProperties.getProperty("jdbcUsePool")).booleanValue();

                if (usePool) {
                    //Try using a pooled DataSource
                    try {
                        ds = pdsf.createPooledDataSource(driverClass, username, password, url);

                        if (LOG.isInfoEnabled()) {
                            LOG.info("Creating DataSource instance for pooled JDBC");
                        }
                       
View Full Code Here

TOP

Related Classes of org.jasig.portal.rdbm.pool.IPooledDataSourceFactory

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.