Examples of ConnectionImpl


Examples of org.jbpm.workflow.core.impl.ConnectionImpl

        timerNode.setName( "Timer" );
        Timer timer = new Timer();
        timer.setDelay( "0" );
        timerNode.setTimer( timer );
        process.addNode( timerNode );
        new ConnectionImpl( start,
                            Node.CONNECTION_DEFAULT_TYPE,
                            timerNode,
                            Node.CONNECTION_DEFAULT_TYPE );
        ActionNode actionNode = new ActionNode();
        actionNode.setId( 3 );
        actionNode.setName( "Action" );
        DroolsConsequenceAction action = new DroolsConsequenceAction();
        action.setDialect( "java" );
        action.setConsequence( "try { Thread.sleep(1000); } catch (Throwable t) {} System.out.println(\"Executed action\");" );
        actionNode.setAction( action );
        process.addNode( actionNode );
        new ConnectionImpl( timerNode,
                            Node.CONNECTION_DEFAULT_TYPE,
                            actionNode,
                            Node.CONNECTION_DEFAULT_TYPE );
        EndNode end = new EndNode();
        end.setId( 6 );
        end.setName( "End" );
        process.addNode( end );
        new ConnectionImpl( actionNode,
                            Node.CONNECTION_DEFAULT_TYPE,
                            end,
                            Node.CONNECTION_DEFAULT_TYPE );

        PackageBuilder packageBuilder = new PackageBuilder();
View Full Code Here

Examples of org.teiid.jdbc.ConnectionImpl

      Properties props = new Properties();
      props.setProperty(BaseDataSource.VDB_NAME, STD_DATABASE_NAME);
      props.setProperty(BaseDataSource.VDB_VERSION, String.valueOf(STD_DATABASE_VERSION));
      props.setProperty(BaseDataSource.USER_NAME, "metamatrixadmin"); //$NON-NLS-1$
      stub(mock.getLogonResult()).toReturn(new LogonResult(new SessionToken(1, "metamatrixadmin"), STD_DATABASE_NAME,STD_DATABASE_VERSION , "fake")); //$NON-NLS-1$
      return new ConnectionImpl(mock, props, serverUrl);
    }
View Full Code Here

Examples of org.teiid.jdbc.ConnectionImpl

        assertEquals(false, getMMConnection().isReadOnly());
    }

    /** test setReadOnly on Connection */
    public void testSetReadOnly1() throws Exception {
      ConnectionImpl conn = getMMConnection();
        conn.setReadOnly(true);
        assertEquals(true, conn.isReadOnly());
    }
View Full Code Here

Examples of org.teiid.jdbc.ConnectionImpl

        assertEquals(true, conn.isReadOnly());
    }

    /** test setReadOnly on Connection during a transaction */
    public void testSetReadOnly2() throws Exception {
      ConnectionImpl conn = getMMConnection();
        conn.setAutoCommit(false);
        try {
            conn.setReadOnly(true);
            fail("Error Expected"); //$NON-NLS-1$
        } catch (SQLException e) {
            // error expected
        }
    }
View Full Code Here

Examples of org.teiid.jdbc.ConnectionImpl

      assertEquals("Parameter is not found at index 0.", e.getMessage());
    }
  }

  private CallableStatementImpl getCallableStatement() throws SQLException {
    ConnectionImpl conn = Mockito.mock(ConnectionImpl.class);
    ServerConnection sc = Mockito.mock(ServerConnection.class);
   
    Mockito.stub(sc.getLogonResult()).toReturn(new LogonResult());
    Mockito.stub(conn.getServerConnection()).toReturn(sc);
   
    CallableStatementImpl mmcs = new CallableStatementImpl(conn, "{?=call x(?)}", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
    return mmcs;
  }
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.