Package javax.jms

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()


    * created.
    */
   public void testTopicConnectionFactory() throws Exception
   {
      TopicConnectionFactory qcf = (TopicConnectionFactory)ic.lookup("/ConnectionFactory");
      TopicConnection tc = qcf.createTopicConnection();
      tc.close();
   }

   public void testAdministrativelyConfiguredClientID() throws Exception
   {
View Full Code Here


        topicConnectionFactory =
          (TopicConnectionFactory) lookup(ctx, topicFactoryName);
       
        if (userId != null && password != null) {
          topicConnection =
             topicConnectionFactory.createTopicConnection(userId, password);
        } else {
          topicConnection =
             topicConnectionFactory.createTopicConnection();
        }
          
View Full Code Here

        if (userId != null && password != null) {
          topicConnection =
             topicConnectionFactory.createTopicConnection(userId, password);
        } else {
          topicConnection =
             topicConnectionFactory.createTopicConnection();
        }
          
        TopicSession topicSession =
          topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
 
View Full Code Here

      topicConnectionFactory =
        (TopicConnectionFactory) lookup(jndi, tcfBindingName);
      getLogger().debug("About to create TopicConnection.");
      if (userName != null) {
        this.topicConnection =
          topicConnectionFactory.createTopicConnection(userName, password);
      } else {
        this.topicConnection = topicConnectionFactory.createTopicConnection();
      }

      getLogger().debug(
View Full Code Here

      getLogger().debug("About to create TopicConnection.");
      if (userName != null) {
        this.topicConnection =
          topicConnectionFactory.createTopicConnection(userName, password);
      } else {
        this.topicConnection = topicConnectionFactory.createTopicConnection();
      }

      getLogger().debug(
        "Creating TopicSession, non-transactional, "
        + "in AUTO_ACKNOWLEDGE mode.");
View Full Code Here

                                     final boolean suppress) throws Exception {
        try {
            final TopicConnectionFactory factory = (TopicConnectionFactory) lookup(context, factoryBindingName);
            TopicConnection conn;
            if (userName != null) {
                conn = factory.createTopicConnection(userName, password);
            } else {
                conn = factory.createTopicConnection();
            }
            final TopicSession sess = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
            final Topic topic = (Topic) lookup(context, queueBindingName);
View Full Code Here

            final TopicConnectionFactory factory = (TopicConnectionFactory) lookup(context, factoryBindingName);
            TopicConnection conn;
            if (userName != null) {
                conn = factory.createTopicConnection(userName, password);
            } else {
                conn = factory.createTopicConnection();
            }
            final TopicSession sess = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
            final Topic topic = (Topic) lookup(context, queueBindingName);
            final TopicPublisher publisher = sess.createPublisher(topic);
            conn.start();
View Full Code Here

                            final String password) {
        try {
            final Context ctx = new InitialContext();
            TopicConnectionFactory topicConnectionFactory;
            topicConnectionFactory = (TopicConnectionFactory) lookup(ctx, tcfBindingName);
            final TopicConnection topicConnection = topicConnectionFactory.createTopicConnection(username, password);
            topicConnection.start();
            final TopicSession topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
            final Topic topic = (Topic) ctx.lookup(topicBindingName);
            final TopicSubscriber topicSubscriber = topicSession.createSubscriber(topic);
            topicSubscriber.setMessageListener(this);
View Full Code Here

    * created.
    */
   public void testTopicConnectionFactory() throws Exception
   {
      TopicConnectionFactory qcf = (TopicConnectionFactory)ic.lookup("/ConnectionFactory");
      TopicConnection tc = qcf.createTopicConnection();
      tc.close();
   }

   public void testAdministrativelyConfiguredClientID() throws Exception
   {
View Full Code Here

    */
   public void testQueueConnection2() throws Exception
   {
      TopicConnectionFactory tcf = JMSTestCase.topicCf;

      TopicConnection tc = tcf.createTopicConnection();

      tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

      tc.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.