Package org.hornetq.jms.client

Examples of org.hornetq.jms.client.HornetQConnectionFactory.createConnection()


      connection2.setClientID("someID");


      failed = false;
      Connection connection3 = cf.createConnection();

      try
      {
         connection3.setClientID("someID");
      }
View Full Code Here


      HornetQConnectionFactory cf = (HornetQConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
                                                                                                                new TransportConfiguration(InVMConnectorFactory.class.getName()));

      cf.setBlockOnDurableSend(true);

      return cf.createConnection();
   }

   // Inner classes -------------------------------------------------

}
View Full Code Here

      connLive.close();

      // Now recreate on backup

      Connection connBackup = jbcfBackup.createConnection();

      Session sessBackup = connBackup.createSession(false, Session.AUTO_ACKNOWLEDGE);

      MessageConsumer consumerBackup = sessBackup.createConsumer(queue);
View Full Code Here

         ConnectionFactory factory = getConnectionFactory();
         HornetQConnectionFactory hcf = (HornetQConnectionFactory) factory;

         hcf.setConsumerWindowSize(0);

         conn = hcf.createConnection();

         conn.setClientID("SomeClientID");

         conn.start();
View Full Code Here

            HashMap<String, Object> params = new HashMap<String, Object>();
            params.put("host", "localhost");
            params.put("port", 5445 + id);
            TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(), params);
            HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
            cf.createConnection().close();
            System.out.println("server restarted");
         }
         catch (Exception e)
         {
            System.out.println("awaiting server restart");
View Full Code Here

      checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
      Topic topic = (Topic)context.lookup(topicJNDIBinding);
      assertNotNull(topic);
      HornetQConnectionFactory cf = new HornetQConnectionFactory(new TransportConfiguration(InVMConnectorFactory.class.getName()));
      Connection connection = cf.createConnection();
      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      // create a consumer will create a Core queue bound to the topic address
      session.createConsumer(topic);

      String topicAddress = HornetQDestination.createTopicAddressFromName(topicName).toString();
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.