Package javax.jms

Examples of javax.jms.Session.unsubscribe()


                     ((TextMessage) rMsg).getText());
       
       
        rMsg = subB.receive(NEGATIVE_RECEIVE_TIMEOUT);
        assertNull("Message should not have been received",rMsg);
        session.unsubscribe("testResubscribeWithChangedSelector");
    }

    public void testDurableSubscribeWithTemporaryTopic() throws Exception
    {
        Connection conn = getConnection();
View Full Code Here


        {
            assertTrue("At most the queue should have only 1 message", ((AMQSession<?, ?>) session).getQueueDepth(queue) <= 1);
        }
       
        // Unsubscribe
        session.unsubscribe("sameMessageSelector");
       
        conn.close();
    }

    /**
 
View Full Code Here

            Message m = subscriber.receive(NEGATIVE_RECEIVE_TIMEOUT);
            assertNull("Unexpected message received", m);
        }
        finally
        {
            session.unsubscribe(getTestName());
        }
    }


    /**
 
View Full Code Here

            assertNotNull("Subscriber on non-nolocal connection should receive message", m2);
        }
        finally
        {
            noLocalSession.unsubscribe(noLocalSubId1);
            consumerSession.unsubscribe(subId);
        }
    }
}
View Full Code Here

            assertEquals("message" + i, tm.getText());
         }

         cons.close();

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

            assertEquals("message" + i, tm.getText());
         }

         cons.close();

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

         if (HornetQRASession.trace)
         {
            HornetQRASession.log.trace("unsubscribe " + session + " name=" + name);
         }

         session.unsubscribe(name);
      }
      finally
      {
         unlock();
      }
View Full Code Here

         }
        
         cons1.close();
         cons2.close();
         cons3.close();
         sess.unsubscribe("sub1");
        
         counters = (List)
         ServerManagement.getAttribute(ServerManagement.getServerPeerObjectName(), "MessageCounters");
     
         assertNotNull(counters);
View Full Code Here

         ProxyAssertSupport.assertNotNull(rm);
         ProxyAssertSupport.assertEquals("thebody", rm.getText());

         ds.close();

         s.unsubscribe("sub");
      }
      finally
      {
         if (conn != null)
         {
View Full Code Here

         sub1.close();

         sub2.close();

         sess1.unsubscribe("sub1");

         sess1.unsubscribe("sub2");

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