Package org.mule.module.db.internal.domain.connection

Examples of org.mule.module.db.internal.domain.connection.DbConnectionFactory


    }

    @Test
    public void testRejectsNonSupportedSql() throws Exception
    {
        DbConnectionFactory dbConnectionFactory = mock(DbConnectionFactory.class);

        for (QueryType type : QueryType.values())
        {
            QueryTemplate queryTemplate = new QueryTemplate("UNUSED SQL TEXT", type, Collections.<QueryParam>emptyList());
View Full Code Here


    @Test
    public void testCommitsWorkIfNoTransactionDefined() throws Exception
    {
        DbConnection connection = mock(DbConnection.class);
        DbConnectionFactory dbConnectionFactory = mock(DbConnectionFactory.class);
        when(dbConnectionFactory.createConnection(TransactionalAction.JOIN_IF_POSSIBLE)).thenReturn(connection);
        SelectExecutor selectExecutor = mock(SelectExecutor.class);

        SelectMessageProcessor processor = new SelectMessageProcessor(null, null, null, null, false);
        MuleEvent event = mock(MuleEvent.class);
        MuleMessage muleMessage = mock(MuleMessage.class);
View Full Code Here

    }

    @Test
    public void testRejectsNonSupportedSql() throws Exception
    {
        DbConnectionFactory dbConnectionFactory = mock(DbConnectionFactory.class);

        for (QueryType type : QueryType.values())
        {
            QueryTemplate queryTemplate = new QueryTemplate("UNUSED SQL TEXT", type, Collections.<QueryParam>emptyList());
View Full Code Here

    @Test
    public void testCommitsWorkIfNoTransactionDefined() throws Exception
    {
        DbConnection connection = mock(DbConnection.class);
        DbConnectionFactory dbConnectionFactory = mock(DbConnectionFactory.class);
        when(dbConnectionFactory.createConnection(TransactionalAction.JOIN_IF_POSSIBLE)).thenReturn(connection);
        QueryExecutor updateExecutor = mock(QueryExecutor.class);

        UpdateMessageProcessor processor = new UpdateMessageProcessor(null, null, null, null, null);
        MuleEvent event = mock(MuleEvent.class);
        MuleMessage muleMessage = mock(MuleMessage.class);
View Full Code Here

    @Test
    public void resolvesCustomDbTypes() throws Exception
    {
        GenericDbConfig dbConfig = muleContext.getRegistry().lookupObject("dbConfig");
        DbTypeManager dbTypeManager = dbConfig.getDbTypeManager();
        DbConnectionFactory connectionFactory = dbConfig.getConnectionFactory();
        DbConnection connection = connectionFactory.createConnection(TransactionalAction.NOT_SUPPORTED);

        try
        {
            assertResolvesType(connection, dbTypeManager, CUSTOM_TYPE_NAME1, CUSTOM_TYPE_ID1);
            assertResolvesType(connection, dbTypeManager, CUSTOM_TYPE_NAME2, CUSTOM_TYPE_ID2);
        }
        finally
        {
            connectionFactory.releaseConnection(connection);
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.module.db.internal.domain.connection.DbConnectionFactory

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.