Examples of createConnection()


Examples of org.osgi.service.io.ConnectionFactory.createConnection()

    ConnectionFactory factory = getFactory(scheme);
    Connection retval = null;

    if (factory != null) {
      retval = factory.createConnection(uri, mode, timeouts);

    } else {

      // fall back to Connector.
      try {
View Full Code Here

Examples of org.palo.viewapi.services.AdministrationService.createConnection()

          conToUse = conn;
          break;
        }
      }
      if (conToUse == null) {
        conToUse = admService.createConnection("PaloCon", psd.host, psd.port, PaloConnection.TYPE_HTTP);
        admService.save(conToUse);
      }
      Account accountToUse = null;
      AuthUser authenticatedUser = null;
      try {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.DriverConnectionProvider.createConnection()

        {
          driverProvider.setProperty(realKey, value);
        }
      }

      return driverProvider.createConnection(realUser, realPassword);
    }
    catch (Exception e)
    {
      throw new ReportDataFactoryException("Unable to create a connection", e);
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.JndiConnectionProvider.createConnection()

      {
        final JndiConnectionProvider connectionProvider = new JndiConnectionProvider();
        connectionProvider.setConnectionPath(jndiName);
        try
        {
          return connectionProvider.createConnection(realUser, realPassword);
        }
        catch (SQLException e)
        {
          throw new ReportDataFactoryException
              ("JNDI dataconnection was requested, but no connection could be established", e);
View Full Code Here

Examples of org.serviceconnector.net.connection.ConnectionFactory.createConnection()

   * Expectation: passes
   */
  @Test
  public void t01_Send50000() throws Exception {
    ConnectionFactory connectionFactory = AppContext.getConnectionFactory();
    IConnection connection = connectionFactory.createConnection(ConnectionType.NETTY_HTTP.getValue());
    connection.setHost(TestConstants.HOST);
    connection.setPort(TestConstants.PORT_SC0_HTTP);
    connection.setIdleTimeoutSeconds(0); // idle timeout inactive
    IIdleConnectionCallback idleCallback = new IdleCallback();
    ConnectionContext connectionContext = new ConnectionContext(connection, idleCallback, 0);
View Full Code Here

Examples of org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection()

    Queue queue = new Queue("foo");
    context.getBeanFactory().registerSingleton("foo", queue);
    context.refresh();
    admin.setApplicationContext(context);
    admin.afterPropertiesSet();
    ccf.createConnection().close();
    ccf.destroy();

    assertEquals("Admin should not have created a channel", 0,  mockChannels.size());
  }
View Full Code Here

Examples of org.springframework.amqp.rabbit.connection.ConnectionFactory.createConnection()

  @Test
  public void testTxSizeAcks() throws Exception {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    Connection connection = mock(Connection.class);
    Channel channel = mock(Channel.class);
    when(connectionFactory.createConnection()).thenReturn(connection);
    when(connection.createChannel(false)).thenReturn(channel);
    final AtomicReference<Consumer> consumer = new AtomicReference<Consumer>();
    doAnswer(new Answer<Object>() {

      @Override
View Full Code Here

Examples of org.springframework.amqp.rabbit.connection.SingleConnectionFactory.createConnection()

      int n = 0;
      while (n++ < 100 && messageCount(rabbitAdmin, queueName) == 0) {
        Thread.sleep(100);
      }
      assertTrue("Message count = 0", n < 100);
      Channel channel = connectionFactory.createConnection().createChannel(false);
      DefaultConsumer consumer = new DefaultConsumer(channel);
      channel.basicConsume(queueName, true, consumer);
      n = 0;
      while (n++ < 100 && messageCount(rabbitAdmin, queueName) > 0) {
        Thread.sleep(100);
View Full Code Here

Examples of org.springframework.jms.connection.SingleConnectionFactory.createConnection()

          return null;
        }
      });

      assertSame(mockSession, ConnectionFactoryUtils.getTransactionalSession(scf, null, false));
      assertSame(mockSession, ConnectionFactoryUtils.getTransactionalSession(scf, scf.createConnection(), false));

      TransactionAwareConnectionFactoryProxy tacf = new TransactionAwareConnectionFactoryProxy(scf);
      Connection tac = tacf.createConnection();
      Session tas = tac.createSession(false, Session.AUTO_ACKNOWLEDGE);
      boolean b = tas.getTransacted();
View Full Code Here

Examples of org.springframework.jms.connection.TransactionAwareConnectionFactoryProxy.createConnection()

      assertSame(mockSession, ConnectionFactoryUtils.getTransactionalSession(scf, null, false));
      assertSame(mockSession, ConnectionFactoryUtils.getTransactionalSession(scf, scf.createConnection(), false));

      TransactionAwareConnectionFactoryProxy tacf = new TransactionAwareConnectionFactoryProxy(scf);
      Connection tac = tacf.createConnection();
      Session tas = tac.createSession(false, Session.AUTO_ACKNOWLEDGE);
      boolean b = tas.getTransacted();
      tas.close();
      tac.close();
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.