Package javax.jms

Examples of javax.jms.Session.unsubscribe()


         delta.close();
         epsilon.close();

         sess0.unsubscribe("alpha");
         sess1.unsubscribe("beta");
         sess2.unsubscribe("gamma");
         sess0.unsubscribe("delta");
         sess1.unsubscribe("epsilon");

      }
      finally
View Full Code Here


            sess2.unsubscribe("sub");
         }
         catch (Exception ignore) {}
         try
         {
            sess3.unsubscribe("sub");
         }
         catch (Exception ignore) {}

         MessageConsumer cons1 = sess1.createDurableSubscriber(topic[0], "sub");
View Full Code Here

           //Ok
         }

         try
         {
           sess3.unsubscribe("sub");

           fail("Did not throw InvalidDestinationException");
         }
         catch (InvalidDestinationException e)
         {
View Full Code Here

         sess2.unsubscribe("sub");

         try
         {
           sess3.unsubscribe("sub");
           fail("Should already be unsubscribed");
         }
         catch (InvalidDestinationException e)
         {
           //Ok - the previous unsubscribe should do a cluster wide unsubscribe
View Full Code Here

         assertNull(m);

         cons2.close();

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

                     ((TextMessage) rMsg).getText());
       
        rMsg = subC.receive(1000);
        assertNull(rMsg);
       
        session.unsubscribe("testResubscribeWithChangedSelectorAndRestart");
       
        subC.close();
        session.close();
        connection.close();
    }
View Full Code Here

            // create kipper
            Topic kipper = sess.createTopic("kipper");
            TopicSubscriber subscriber = sess.createDurableSubscriber(kipper, "kipper");

            subscriber.close();
            sess.unsubscribe("kipper");

            //Do something to show connection is active.
            sess.rollback();
            conn.close();
        }
View Full Code Here

            // create kipper
            Topic kipper = sess.createTopic("kipper");
            TopicSubscriber subscriber = sess.createDurableSubscriber(kipper, "kipper");

            subscriber.close();
            sess.unsubscribe("kipper");

            //Do something to show connection is active.
            sess.rollback();
            conn.close();
        }
View Full Code Here

        assertNull("There should be no more messages for consumption on consumer3.", msg);

        consumer1.close();
        consumer3.close();

        session3.unsubscribe("MySubscription");

        con0.close();
        con1.close();
        con3.close();
    }
View Full Code Here

      Message msg = liveSubscriber.receive(POSITIVE_RECEIVE_TIMEOUT);
      assertNotNull ("Message should have been received", msg);
      assertEquals ("testDurableWithInvalidSelector2", ((TextMessage) msg).getText());
      assertNull("Should not receive subsequent message", liveSubscriber.receive(200));
        liveSubscriber.close();
        session.unsubscribe("testDurableWithInvalidSelectorSub");
    }
   
    /**
     * This tests the fix for QPID-1085
     * Creates a durable subscriber with an invalid destination, checks that the
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.