Examples of StandardDataSource


Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Override
    protected StandardDataSource createInstance() throws Exception
    {
        StandardDataSource dataSource = new StandardDataSource();
        dataSource.setDriverName(driverClassName);
        if (loginTimeout >= 0)
        {
            dataSource.setLoginTimeout(loginTimeout);
        }
        dataSource.setPassword(password);
        dataSource.setTransactionIsolation(transactionIsolation);
        dataSource.setUrl(url);
        dataSource.setUser(user);
        return dataSource;
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

            if (errorCount == EXPECTED_CONNECTION_ERRORS)
            {
                // Fixes dataource's URL to enable connection
                GenericDbConfig config = muleContext.getRegistry().get("badDbConfig");
                StandardDataSource dataSource = (StandardDataSource) config.getDataSource();
                dataSource.setUrl("jdbc:derby:muleEmbeddedDB;create=true");
            }
        }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

        return createEmbeddedDataSource();
    }
   
    protected DataSource createEmbeddedDataSource() throws Exception
    {
        StandardDataSource ds = new StandardDataSource();
        ds.setDriverName(EMBEDDED_DRIVER_NAME);
        ds.setUrl(EMBEDDED_CONNECTION_STRING);
        return ds;
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

        return ds;
    }
   
    protected DataSource createClientDataSource() throws Exception
    {
        StandardDataSource ds = new StandardDataSource();
        ds.setDriverName(CLIENT_DRIVER_NAME);
        ds.setUrl(CLIENT_CONNECTION_STRING);
        return ds;
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testSingleton()
    {
        StandardDataSource ds1 = lookupDataSource("default-oracle");
        StandardDataSource ds2 = lookupDataSource("default-oracle");
        assertSame(ds1, ds2);
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testCustomDataSourceProperties()
    {
        StandardDataSource source = lookupDataSource("custom-ds-properties");
        assertEquals(Connection.TRANSACTION_SERIALIZABLE, source.getTransactionIsolation());
        assertEquals(42, source.getLoginTimeout());
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testOracleDefaults()
    {
        StandardDataSource source = lookupDataSource("default-oracle");
        assertEquals("jdbc:oracle:thin:@localhost:1521:orcl", source.getUrl());
        assertEquals("oracle.jdbc.driver.OracleDriver", source.getDriverName());
        assertEquals(-1, source.getTransactionIsolation());
        assertEquals("scott", source.getUser());
        assertEquals("tiger", source.getPassword());
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testOracleCustomUrl()
    {
        StandardDataSource source = lookupDataSource("custom-url-oracle");
        assertEquals("jdbc:oracle:thin:@some-other-host:1522:mule", source.getUrl());
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testOracleCustomHost()
    {
        StandardDataSource source = lookupDataSource("custom-host-oracle");
        assertEquals("jdbc:oracle:thin:@some-other-host:1521:orcl", source.getUrl());
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testOracleCustomPort()
    {
        StandardDataSource source = lookupDataSource("custom-port-oracle");
        assertEquals("jdbc:oracle:thin:@localhost:1522:orcl", source.getUrl());
    }
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.