Package javax.jms

Examples of javax.jms.TopicConnection.start()


                // Crude, but currently the only known way to find out
                // whether we're running in server or client container.
                // And we need to know because of J2EE 1.4 spec, J2EE.6.6.
                TopicConnection topCon
                    = topConFacCache.createTopicConnection();
                topCon.start ();
                jmsConnectionReusable = Boolean.FALSE;
                TopicSession ts1 = null;
                TopicSession ts2 = null;
                try {
                    ts1 = topCon.createTopicSession
View Full Code Here


                return topConCache;
            }
  }
  TopicConnection topCon = ((TopicConnectionFactory)topConFacCache)
            .createTopicConnection();
        topCon.start ();
        return topCon;
    }

    private class EventSubscriberImpl implements EventSubscriber {
View Full Code Here

            TopicSession session = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
            Topic topic = session.createTopic(topicName);
            TopicSubscriber subscriber = session.createSubscriber(topic);
            MessageListener messageListener = new JMSMessageListener(brokerListener);
            subscriber.setMessageListener(messageListener);
            topicConnection.start();
        } catch (JMSException e) {
            String error = "Failed to subscribe to topic:" + topicName;
            log.error(error, e);
            throw new BrokerEventProcessingException(error, e);
        }
View Full Code Here

            }
            System.out.println("Connection Factory ready");

            // Openning a connection with the connection Factory
            TopicConnection connection = factory.createTopicConnection();
            connection.start();
            System.out.println("Connection ready");

            // Openning a session within the connection
            TopicSession session = connection.createTopicSession(transacted, ackType);
            System.out.println("Session ready");
View Full Code Here

              }
              System.out.println("Connection Factory ready");

              // Create a connection with the ConnectionFactory
              TopicConnection connection = factory.createTopicConnection();
              connection.start();
              System.out.println("Connection ready");

              // Create a session within the connection
              TopicSession session = connection.createTopicSession(transacted,ackType);
              System.out.println("Session ready");
View Full Code Here

                        "Failed to locate connection factory");
                }

                TopicConnection connection =
                    factory.createTopicConnection();
                connection.start();

                TopicSession session = connection.createTopicSession(
                    false, Session.CLIENT_ACKNOWLEDGE);
                Topic topic = null;
                topic = session.createTopic(topic_name);
View Full Code Here

                    throw new RuntimeException(
                        "Failed to locate connection factory");
                }

                TopicConnection connection = factory.createTopicConnection();
                connection.start();

                TopicSession session =
                    connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

                // this is not the preferred way to get a topic
View Full Code Here

                    subscriber.setMessageListener(consumer);
                    connection.setExceptionListener(consumer);

                    // start the connection unless the noStart option is specified
                    if (!cmdline.exists("noStart")) {
                        connection.start();
                    }

                } else {
                    System.err.println("Cannot subscribe to messages under "
                        + "null topic");
View Full Code Here

            }
   
       TopicConnection connection = factory_.createTopicConnection();
       TopicSession session = connection.createTopicSession
         (false, Session.CLIENT_ACKNOWLEDGE);
             connection.start();
       Topic topic = session.createTopic("OpenJMSDemo-deals");
       // if the 'name' option has been specified then assume a
       // durable subscriber otherwise transient
       TopicSubscriber subscriber = null;
       subscriber = session.createDurableSubscriber(topic, "DealMgr");
View Full Code Here

      getLog().debug("Starting TopicNoLocal test");
      connect();

      TopicConnectionFactory topicFactory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY);
      TopicConnection topicConnection1 = topicFactory.createTopicConnection();
      topicConnection1.start();
      TopicConnection topicConnection2 = topicFactory.createTopicConnection();
      topicConnection2.start();

      // We don't want local messages on this topic.
      Session session1 = topicConnection1.createSession(false, Session.AUTO_ACKNOWLEDGE);
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.