Examples of createConnection()


Examples of bitronix.tm.resource.jms.PoolingConnectionFactory.createConnection()

        pcf.setAcquisitionTimeout(1);
        pcf.init();

        assertFalse(TransactionManagerServices.isTransactionManagerRunning());

        Connection c = pcf.createConnection();
        Session s = c.createSession(false, 0);
        Queue q = s.createQueue("q");
        MessageProducer mp = s.createProducer(q);
        mp.send(s.createTextMessage("test123"));
        mp.close();
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnectionFactory.createConnection()

    public void testSingle() {
        CommunicationConnectionFactory factory = new DubboCommunicationConnectionFactory();
        CommunicationParam param = new CommunicationParam();
        param.setIp("127.0.0.1");
        param.setPort(2088);
        CommunicationConnection connection = factory.createConnection(param);
        Object result = connection.call(new HeartEvent());
        want.object(result).notNull();
    }

}
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnectionPoolFactory.createConnection()

        CommunicationConnection last = null;
        for (int i = 0; i < 11; i++) {
            CommunicationConnection connection = null;
            try {
                connection = poolFactory.createConnection(param);
                connection.call(new PoolEvent(PoolEventType.pool));
                last = connection;
                if (last != null) { // 检查链接是否是重用
                    want.object(last).isEqualTo(connection);
                }
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationConnectionFactory.createConnection()

    public void testSingle() {
        CommunicationConnectionFactory factory = new DubboCommunicationConnectionFactory();
        CommunicationParam param = new CommunicationParam();
        param.setIp("127.0.0.1");
        param.setPort(2088);
        CommunicationConnection connection = factory.createConnection(param);
        Object result = connection.call(new HeartEvent());
        want.object(result).notNull();
    }

}
View Full Code Here

Examples of com.alibaba.otter.shared.communication.core.impl.rmi.RmiCommunicationConnectionFactory.createConnection()

    public void testSingle() {
        CommunicationConnectionFactory factory = new RmiCommunicationConnectionFactory();
        CommunicationParam param = new CommunicationParam();
        param.setIp("127.0.0.1");
        param.setPort(1099);
        CommunicationConnection connection = factory.createConnection(param);
        Object result = connection.call(new HeartEvent());
        want.object(result).notNull();
    }

    @Test
View Full Code Here

Examples of com.bitsofproof.supernode.common.InMemoryBusConnectionFactory.createConnection()

  @Test
  public void mockTopicTest () throws JMSException
  {
    ConnectionFactory factory = new InMemoryBusConnectionFactory ();
    Connection connection = factory.createConnection ();
    Session session = connection.createSession (false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer producer = session.createProducer (session.createTopic ("test"));
    final MessageConsumer consumer = session.createConsumer (session.createTopic ("test"));
    consumer.setMessageListener (new MessageListener ()
    {
View Full Code Here

Examples of com.facebook.presto.connector.ConnectorManager.createConnection()

        injector.getInstance(Announcer.class).start();

        lifeCycleManager = injector.getInstance(LifeCycleManager.class);

        ConnectorManager connectorManager = injector.getInstance(ConnectorManager.class);
        connectorManager.createConnection("default", "native", ImmutableMap.<String, String>of());
        connectorManager.createConnection("tpch", "tpch", ImmutableMap.<String, String>of());

        server = injector.getInstance(TestingHttpServer.class);
        metadata = injector.getInstance(Metadata.class);
        nodeManager = injector.getInstance(NodeManager.class);
View Full Code Here

Examples of com.facebook.presto.server.testing.TestingPrestoServer.createConnection()

        TestingPrestoServer server = new TestingPrestoServer(coordinator, properties.build(), ENVIRONMENT, discoveryUri, ImmutableList.<Module>of());

        // install tpch plugins
        server.installPlugin(new TpchPlugin());
        server.createConnection("tpch", "tpch");

        server.installPlugin(new SampledTpchPlugin());
        server.createConnection("tpch_sampled", "tpch_sampled");

        // install raptor plugin
View Full Code Here

Examples of com.founder.fix.fixflow.shell.DBConnFactory.createConnection()

      password = MD5.getMD5(password.getBytes());
      list.add(password);
     
      StringBuffer sb = new StringBuffer();
      sb.append("SELECT USERID,USERNAME FROM AU_USERINFO WHERE LOGINID=? AND PASSWORD=?");
      connection = dbcf.createConnection();
      //这里是自带的数据库操作方式。
      SqlCommand sqlcommand = new SqlCommand(connection);
      List<Map<String, Object>> list2 = sqlcommand.queryForList(sb.toString(),list);
      if(list2!=null && list2.size()>0){
        //这里约定了一个参数,流程引擎在运行时会默认从session里按照这两个key来获取参数,如果替换了登录的方式,请保证这两个key依然可以获取到正确的数据
View Full Code Here

Examples of com.sun.messaging.AdminConnectionFactory.createConnection()

        JMXConnector connector;
        MBeanServerConnection connection;
        AdminConnectionFactory acf;
        acf = new AdminConnectionFactory();
        acf.setProperty(AdminConnectionConfiguration.imqAddress, broker);
        connector = acf.createConnection();

        try {
            connection = connector.getMBeanServerConnection();
            ObjectName exchangeManagerName = new ObjectName("com.sun.messaging.jms.server:" + typeName);
            String[] consumerIDs = (String[]) connection.invoke(exchangeManagerName, "getConsumerIDs", null, 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.