Examples of createTopicConnection()


Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

   {
      getLog().debug("Starting TopicSelectorChange test");

      getLog().debug("Create topic connection");
      TopicConnectionFactory topicFactory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY);
      topicConnection = topicFactory.createTopicConnection("john", "needle");
      topicConnection.start();

      try
      {
         getLog().debug("Retrieving Topic");
View Full Code Here

Examples of javax.jms.XATopicConnectionFactory.createTopicConnection()

      }
      else if (factory instanceof TopicConnectionFactory)
      {
         TopicConnectionFactory tFactory = (TopicConnectionFactory) factory;
         if (username != null)
            connection = tFactory.createTopicConnection(username, password);
         else
            connection = tFactory.createTopicConnection();

         log.debug("created TopicConnection: " + connection);
      }
View Full Code Here

Examples of org.activemq.ActiveMQConnectionFactory.createTopicConnection()

     */
    public static void main(String[] args) throws Exception {
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
        ActiveMQTopic pubTopic = new ActiveMQTopic("demo.org.servicemix.source");
        System.out.println("Connecting to JMS server.");
        TopicConnection connection = factory.createTopicConnection();
        TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
        connection.start();
        TopicRequestor requestor = new TopicRequestor(session, pubTopic);
        System.out.println("Sending request.");
        String payload = "";
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory.createTopicConnection()

    private TopicConnection createConnection() throws Exception
    {
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
        connectionFactory.setBrokerURL(connectionUri);
        TopicConnection conn = connectionFactory.createTopicConnection();
        return conn;
    }

}
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl.createTopicConnection()

        int inactiveSubscribersAtStart = adminView.getInactiveDurableTopicSubscribers().length;
        LOG.debug(">>>> At Start, durable Subscribers {} inactiveDurableSubscribers {}", durableSubscribersAtStart, inactiveSubscribersAtStart);

        TopicConnectionFactory factory = new ConnectionFactoryImpl("localhost", port, "admin", "password");
        Topic topic = new TopicImpl("topic://" + TOPIC_NAME);
        TopicConnection subscriberConnection = factory.createTopicConnection();
        subscriberConnection.setClientID(durableClientId);
        TopicSession subscriberSession = subscriberConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
        TopicSubscriber messageConsumer = subscriberSession.createDurableSubscriber(topic, durableSubscriberName);

        assertNotNull(messageConsumer);
View Full Code Here

Examples of org.xmlBlaster.jms.XBConnectionFactory.createTopicConnection()

         // create a factory (normally retreived by naming service)
         TopicConnectionFactory factory = new XBConnectionFactory(null, this.cmdLine, false);
         // should be retreived via jndi
         Topic topic = new XBDestination("jms-test", null, false);
     
         TopicConnection connection = factory.createTopicConnection();
         connection.start();
         TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         TopicSubscriber subscriber = session.createSubscriber(topic);
         subscriber.setMessageListener(this);
     
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.