Examples of StandardDataSource


Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testDerbyCustomUrl()
    {
        StandardDataSource source = lookupDataSource("custom-url-derby");
        assertEquals("jdbc:derby:muleEmbedded", source.getUrl());
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testDerbyCreateDatabase()
    {
        StandardDataSource source = lookupDataSource("create-database-derby");
        assertEquals("jdbc:derby:memory:mule;create=true", source.getUrl());
    }
View Full Code Here

Examples of org.enhydra.jdbc.standard.StandardDataSource

    }

    @Test
    public void testConnectionUnreachableFailure() throws MuleException
    {
        ((JdbcConnector) getConnector()).setDataSource(new StandardDataSource());
        assertFalse(getConnector().isStarted());
        assertFalse(getConnector().isConnected());
        assertTrue(getConnector() instanceof Testable);
        assertTrue(((Testable) getConnector()).test().getStatus() == TestResult.Status.FAILURE);
        System.out.println(((Testable) getConnector()).test().getMessage());
View Full Code Here

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

        }
    }

    private DataSource createSingleDataSource() throws SQLException
    {
        StandardDataSource dataSource = useXaTransactions ? new StandardXADataSource() : new StandardDataSource();
        dataSource.setDriverName(driverClassName);
        if (connectionTimeout >= 0)
        {
            dataSource.setLoginTimeout(connectionTimeout);
        }
        dataSource.setPassword(password);
        dataSource.setTransactionIsolation(transactionIsolation);
        dataSource.setUrl(url);
        dataSource.setUser(username);

        return dataSource;
    }
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.