Examples of createTopicConnection()


Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

      TopicConnection conn = null;
     
      try
      {
         conn = cf.createTopicConnection();
  
         conn.setClientID("Client1");
  
         TopicSession s = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

     
      try
      {
         Topic topic = (Topic)ic.lookup("/topic/TopicMessageList");
  
         conn = cf.createTopicConnection();
  
         conn.setClientID("Client1");
  
         TopicSession s = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         MessageProducer prod = s.createProducer(topic);
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

   public void testTopicConnectionConsumerWrongTemporaryDestination() throws Exception
   {
      InitialContext ctx = getInitialContext();
      TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
      Topic topic = null;
      TopicConnection connection = factory.createTopicConnection();
      try
      {
         TopicSession s = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         topic = s.createTemporaryTopic();
         TopicConnection connection2 = factory.createTopicConnection();
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

      TopicConnection connection = factory.createTopicConnection();
      try
      {
         TopicSession s = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         topic = s.createTemporaryTopic();
         TopicConnection connection2 = factory.createTopicConnection();
         try
         {
            connection2.createConnectionConsumer(topic, "", MockServerSessionPool.getServerSessionPool(), 1);
            fail("Expected an error listening to a temporary destination from a different connection");
         }
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

      // Subscribe to a topic and validate the subscription shows up in the list op
      InitialContext ctx = super.getInitialContext();
      Topic topicDest = (Topic) ctx.lookup("testCreateTopic");
      TopicConnectionFactory tcf = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
      TopicConnection tc = tcf.createTopicConnection();
      tc.start();
      TopicSession ts = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
      MessageConsumer mc = ts.createConsumer(topicDest);
      MessageProducer mp = ts.createProducer(topicDest);
      Message helloMsg = ts.createTextMessage("Hello from testCreateTopic");
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

      assertNotNull(component);
     
      Topic topic = (Topic) getInitialContext().lookup("testCreateTopic");
      TopicConnectionFactory cf = (TopicConnectionFactory) getInitialContext().lookup("ConnectionFactory");
     
      TopicConnection connection = cf.createTopicConnection();
      TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
      session.createSubscriber(topic);
     
      TopicPublisher pub = session.createPublisher(topic);
      try
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

     QueueConnectionFactory queueFactory = (QueueConnectionFactory)context.lookup(QUEUE_FACTORY);
     queueConnection = queueFactory.createQueueConnection();

     TopicConnectionFactory topicFactory = (TopicConnectionFactory)context.lookup(TOPIC_FACTORY);
     topicConnection = topicFactory.createTopicConnection();

     getLog().debug("Connection to JMS provider established.");

   }
  
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

   {
      getLog().debug("Starting Topic test");
      connect();

      TopicConnectionFactory topicFactory = (TopicConnectionFactory) context.lookup(TOPIC_FACTORY);
      topicConnection = topicFactory.createTopicConnection("john", "needle");
     
      topicConnection.setClientID("john_id");

      topicConnection.start();
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

   {
      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.
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

      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);
      Topic topic = (Topic) context.lookup(TEST_TOPIC);
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.