Examples of unsubscribe()


Examples of javax.jms.Session.unsubscribe()

         }

         log.debug("unsubscribing mySubscription");

         durable.close();
         sess5.unsubscribe("mySubscription");
         log.debug("unsubscribing done");
         conn5.close();

         // Resubscribe with the same name
         conn6 = cf.createConnection();
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

         assertEquals(NUM_MESSAGES - NUM_TO_RECEIVE, count);

         durable2.close();

         sess2.unsubscribe("mySubscription");
      }
      finally
      {
         if (conn1 != null)
         {
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

         assertEquals(0, count);

         durable2.close();

         sess2.unsubscribe("mySubscription");
      }
      finally
      {
         if (conn1 != null)
         {
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

         Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);

         try
         {
            sess1.unsubscribe("non-existent subscription");
            fail();
         }
         catch (JMSException e)
         {
         }
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

      prod.send(s.createTextMessage("one"));

      log.debug("unsubscribing ...");

      cons.close();
      s.unsubscribe("uzzi");

      log.debug("resubscribing ...");

      MessageConsumer ds = s.createDurableSubscriber(topic, "uzzi");
      conn.start();
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

      assertNull(ds.receive(1000));
     
      ds.close();
     
      s.unsubscribe("uzzi");

      conn.close();
   }

   public void testInvalidSelectorException() throws Exception
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

      TopicSubscriber dursub = s.createDurableSubscriber(topic, "dursub0");

      try
      {
         s.unsubscribe("dursub0");
         fail();
      }
      catch (IllegalStateException e)
      {
         //Ok - it is illegal to ubscribe a subscription if it has active consumers
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

         //Ok - it is illegal to ubscribe a subscription if it has active consumers
      }
        
      dursub.close();
     
      s.unsubscribe("dursub0");

      conn.close();
   }

   // Package protected ---------------------------------------------
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

        
         sub2.close();
        
         sub3.close();
        
         sess.unsubscribe("sub1");
        
         sess.unsubscribe("sub2");
        
         sess.unsubscribe("sub3");
           
View Full Code Here

Examples of javax.jms.Session.unsubscribe()

        
         sub3.close();
        
         sess.unsubscribe("sub1");
        
         sess.unsubscribe("sub2");
        
         sess.unsubscribe("sub3");
           
      }
      finally
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.