Пример #1
0
 protected void assureMessagesRemoved() throws Exception {
   String jndiHost = JMSTestFixture.getJndiHost();
   int jndiPort = JMSTestFixture.getJndiPort();
   JBossMQManager manager = new JBossMQManager(jndiHost, jndiPort);
   manager.initialize();
   manager.removeTestMessages();
 }
Пример #2
0
 public List listMessages() throws Exception {
   JBossMQManager manager =
       new JBossMQManager(JMSTestFixture.getJndiHost(), JMSTestFixture.getJndiPort());
   manager.initialize();
   List messages = manager.listMessages();
   return messages;
 }
Пример #3
0
 public static Long getMessageCount(String destinationType, String destinationName)
     throws Exception {
   JBossMQProxy proxy =
       new JBossMQProxy(JMSTestFixture.getJndiHost(), JMSTestFixture.getJndiPort());
   Long messageCount =
       proxy.countMessages("name=\"" + destinationName + "\",type=" + destinationType);
   return messageCount;
 }
Пример #4
0
 public static void removeMessages(String destinationType, String destinationName)
     throws Exception {
   JBossMQProxy proxy =
       new JBossMQProxy(JMSTestFixture.getJndiHost(), JMSTestFixture.getJndiPort());
   proxy.removeMessages("name=\"" + destinationName + "\",type=" + destinationType);
 }