Examples of TestConnection


Examples of org.jboss.test.jca.jdbc.TestConnection

      ManagedConnectionPool mcp = new JBossManagedConnectionPool.OnePool(mcf, pp, false, log);
      NoTxConnectionManager noTxn = new NoTxConnectionManager(null, mcp);
      mcp.setConnectionListenerFactory(noTxn);
      Connection conn = (Connection)noTxn.allocateConnection(mcf, null);
      Object proxy = ((WrappedConnection)conn).getUnderlyingConnection();
      TestConnection uc = (TestConnection) Proxy.getInvocationHandler(proxy);
      uc.setFail(true);
     
      try
      {
         conn.createStatement().execute("blah");
        
View Full Code Here

Examples of org.jboss.test.jca.jdbc.TestConnection

      ManagedConnectionPool mcp = new JBossManagedConnectionPool.OnePool(mcf, pp, false, log);
      NoTxConnectionManager noTxn = new NoTxConnectionManager(null, mcp);
      mcp.setConnectionListenerFactory(noTxn);
      Connection conn = (Connection)noTxn.allocateConnection(mcf, null);
      Object proxy = ((WrappedConnection)conn).getUnderlyingConnection();
      TestConnection uc = (TestConnection) Proxy.getInvocationHandler(proxy);
      uc.setFail(true);
     
      try
      {
         conn.createStatement().execute("blah");
        
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.TestConnection

      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_MANAGER, ConnectionFactoryInterceptor.MANAGED_CONNECTION_FACTORY, mcf);
      DataSource ds = (DataSource) assertCreateHollowProxy(new Class[] { DataSource.class }, metadata, DataSource.class);
      Connection c = ds.getConnection();
      assertNotNull(c);
      assertTrue(c instanceof TestConnection);
      TestConnection tc = (TestConnection) c;
      assertNotNull(tc.getManagedConnectionFactory());
      assertTrue(mcf == tc.getManagedConnectionFactory());
   }
View Full Code Here

Examples of org.jitterbit.integration.server.implementation.webservice.interchange.connection.client.TestConnection

        return list;
    }

    private List<String> testFileSource(Source source, DataLocation fLoc, ServerCallback callback)
                    throws IntegrationServerException, RemoteException {
        TestConnection testConnection = getTestConnection(callback);
        if (testConnection == null) {
            // The callback should already have been notified by now.
            return null;
        }

        ConnectionInfo ci = getConnectionInfo(fLoc, true);

        FileList fileList = testConnection.testFileTypeConnection(userName, password, ci, source.getID().toString(),
                        true);

        return toList(fileList.getFiles());
    }
View Full Code Here

Examples of org.red5.server.api.TestConnection

  }

  @Test
  public void connectionHandler() {
    log.debug("-----------------------------------------------------------------connectionHandler");
    TestConnection conn = new TestConnection(host, "/", null);
    // add the connection to thread local
    Red5.setConnectionLocal(conn);
    // resolve root
    IScope scope = context.resolveScope("/");
    IClientRegistry reg = context.getClientRegistry();
    IClient client = reg.newClient(null);
    assertNotNull(client);
    conn.initialize(client);
    if (conn.connect(scope)) {
      assertTrue("should have a scope", conn.getScope() != null);
      conn.close();
      assertTrue("should not be connected", !conn.isConnected());
    } else {
      assertTrue("didnt connect", false);
    }
    Red5.setConnectionLocal(null);
  }
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.