Package javax.jms

Examples of javax.jms.Session.unsubscribe()


        // the previous durable subscription is lost and (hopefully) garbage collected.
        assertNull(m);
       
        durable.close();
       
        s.unsubscribe("monicabelucci");
      }
      finally
      {
        if (conn != null)
        {
View Full Code Here


        
         sub1.close();
        
         sub2.close();
        
         sess1.unsubscribe("sub1");
        
         sess1.unsubscribe("sub2");
        
      }
      finally
View Full Code Here

        
         sub2.close();
        
         sess1.unsubscribe("sub1");
        
         sess1.unsubscribe("sub2");
        
      }
      finally
      {
         if (conn1 != null)
View Full Code Here

        
         sub1.close();
        
         sub2.close();
        
         sess1.unsubscribe("sub1");
        
         sess1.unsubscribe("sub2");        

      }
      finally
View Full Code Here

        
         sub2.close();
        
         sess1.unsubscribe("sub1");
        
         sess1.unsubscribe("sub2");        

      }
      finally
      {
         if (conn1 != null)
View Full Code Here

        tm = (TextMessage)ds.receive(1000);
        assertEquals("two", tm.getText());
       
        ds.close();
       
        s.unsubscribe("monicabelucci");
      }
      finally
      {
        if (conn != null)
        {
View Full Code Here

        prod.setDeliveryMode(DeliveryMode.PERSISTENT);
 
        prod.send(s.createTextMessage("one"));
 
        cons.close();
        s.unsubscribe("uzzi")

        MessageConsumer ds = s.createDurableSubscriber(topic1, "uzzi");
        conn.start();
 
        assertNull(ds.receive(1000));
View Full Code Here

 
        assertNull(ds.receive(1000));
       
        ds.close();
       
        s.unsubscribe("uzzi");
      }
      finally
      {
        if (conn != null)
        {
View Full Code Here

 
        TopicSubscriber dursub = s.createDurableSubscriber(topic1, "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

           //Ok - it is illegal to ubscribe a subscription if it has active consumers
        }
          
        dursub.close();
       
        s.unsubscribe("dursub0");
      }
      finally
      {
        if (conn != null)
        {
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.