Examples of DBCPDataSourceFactory


Examples of org.apache.cayenne.configuration.server.DBCPDataSourceFactory

        DataNodeDescriptor nodeDescriptor = new DataNodeDescriptor();
        nodeDescriptor.setConfigurationSource(new URLResource(url));
        nodeDescriptor.setParameters("testDBCP.properties");

        DBCPDataSourceFactory factory = new DBCPDataSourceFactory();
        DataSource dataSource = factory.getDataSource(nodeDescriptor);
        assertNotNull(dataSource);

        assertTrue(dataSource instanceof BasicDataSource);
        BasicDataSource basicDataSource = (BasicDataSource) dataSource;
        assertEquals("com.example.jdbc.Driver", basicDataSource.getDriverClassName());
View Full Code Here

Examples of org.apache.cayenne.configuration.server.DBCPDataSourceFactory

        DataNodeDescriptor nodeDescriptor = new DataNodeDescriptor();
        nodeDescriptor.setConfigurationSource(new URLResource(url));
        nodeDescriptor.setParameters("testDBCP_legacy.properties");

        DBCPDataSourceFactory factory = new DBCPDataSourceFactory();
        DataSource dataSource = factory.getDataSource(nodeDescriptor);
        assertNotNull(dataSource);

        assertTrue(dataSource instanceof BasicDataSource);
        BasicDataSource basicDataSource = (BasicDataSource) dataSource;
        assertEquals("com.example.jdbc.Driver", basicDataSource.getDriverClassName());
View Full Code Here

Examples of org.apache.cayenne.configuration.server.DBCPDataSourceFactory

        DataNodeDescriptor nodeDescriptor = new DataNodeDescriptor();
        nodeDescriptor.setConfigurationSource(new URLResource(url));
        nodeDescriptor.setParameters("testDBCP.properties.nosuchfile");

        DBCPDataSourceFactory factory = new DBCPDataSourceFactory();

        try {
            factory.getDataSource(nodeDescriptor);
            fail("didn't throw on abscent config file");
        }
        catch (IOException ex) {
            // expected
        }
View Full Code Here

Examples of org.geotools.data.jdbc.datasource.DBCPDataSourceFactory

*
* @source $URL$
*/
public class DataSourceFinderTest extends TestCase {
    public void testDbcpFactory() throws IOException {
        assertTrue(new DBCPDataSourceFactory().isAvailable());
        DataSourceFinder.scanForPlugins();
       
        Map map = new HashMap();
        map.put(DBCPDataSourceFactory.DSTYPE.key, "DBCP");
        map.put(DBCPDataSourceFactory.DRIVERCLASS.key, "org.h2.Driver");
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.