Package org.jboss.jms.server

Examples of org.jboss.jms.server.DestinationManager


  
   public void testDestinationManager() throws Exception
   {
      ServerPeer sp = ServerManagement.getServer().getServerPeer();
     
      DestinationManager dm = sp.getDestinationManager();
     
      dm.stop();
     
      dm.start();
       
      ManagedQueue queue1 = new ManagedQueue("queue1", 1000, 10, 10);
     
      ManagedTopic topic1 = new ManagedTopic("topic1", 1000, 10, 10);
     
      dm.registerDestination(queue1);
     
      dm.registerDestination(topic1);
     
      ManagedDestination queue2 = dm.getDestination("not exists", true);
     
      assertNull(queue2);
     
      ManagedDestination topic2 = dm.getDestination("not exists", false);
     
      assertNull(topic2);
     
      ManagedQueue queue3 = (ManagedQueue)dm.getDestination("queue1", true);
     
      assertTrue(queue1 == queue3);
     
      ManagedDestination queue4 = dm.getDestination("queue1", false);
     
      assertNull(queue4);
     
      ManagedTopic topic3 = (ManagedTopic)dm.getDestination("topic1", false);
     
      assertTrue(topic1 == topic3);
     
      ManagedDestination topic4 = dm.getDestination("topic1", true);
     
      assertNull(topic4);           
           
      dm.unregisterDestination(queue1);
     
      ManagedDestination queue5 = dm.getDestination("queue1", true);
     
      assertNull(queue5);
     
      dm.unregisterDestination(topic1);
     
      ManagedDestination topic5 = dm.getDestination("topic1", false);
     
      assertNull(topic5);
     
      dm.registerDestination(queue1);
     
      dm.registerDestination(topic1);
     
      dm.stop();
     
      dm.start();
   }
View Full Code Here


               }

               //
               // Remove temporary destination from the DestinationManager (JBMESSAGING-1215)
               //
               DestinationManager dm = serverPeer.getDestinationManager();

               ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
               if (dm == null)
               {
                  throw new InvalidDestinationException("No such destination: " + dest);
               }

               dm.unregisterDestination(mDest);
            }

            temporaryDestinations.clear();
         }
View Full Code Here

               }

               //
               // Remove temporary destination from the DestinationManager (JBMESSAGING-1215)
               //
               DestinationManager dm = serverPeer.getDestinationManager();

               ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
               if (dm == null)
               {
                  throw new InvalidDestinationException("No such destination: " + dest);
               }

               dm.unregisterDestination(mDest);
            }

            temporaryDestinations.clear();
         }
View Full Code Here

               }

               //
               // Remove temporary destination from the DestinationManager (JBMESSAGING-1215)
               //
               DestinationManager dm = serverPeer.getDestinationManager();

               ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
               if (dm == null)
               {
                  throw new InvalidDestinationException("No such destination: " + dest);
               }

               dm.unregisterDestination(mDest);
            }

            temporaryDestinations.clear();
         }
View Full Code Here

               }

               //
               // Remove temporary destination from the DestinationManager (JBMESSAGING-1215)
               //
               DestinationManager dm = serverPeer.getDestinationManager();

               ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
               if (dm == null)
               {
                  throw new InvalidDestinationException("No such destination: " + dest);
               }

               dm.unregisterDestination(mDest);
            }

            temporaryDestinations.clear();
         }
View Full Code Here

            Session.AUTO_ACKNOWLEDGE);

      TemporaryQueue tempQueue = responseSession.createTemporaryQueue();
      log.info("Created TemporaryQueue: " + tempQueue);

      DestinationManager dm = ServerManagement.getDestinationManager();
      Set destinations = dm.getDestinations();
      log.info("Destinations after temp queue creation: " + destinations);

      assertTrue("Temporary destination is not registered in destination manager.", destinations.contains(tempQueue));

      connection.close();

      destinations = dm.getDestinations();
      log.info("Destinations after connection.close(): " + destinations);
      assertTrue("Temporary destination is registered in destination manager.", ! destinations.contains(tempQueue));
   }
View Full Code Here

               }

               //
               // Remove temporary destination from the DestinationManager (JBMESSAGING-1215)
               //
               DestinationManager dm = serverPeer.getDestinationManager();

               ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
               if (dm == null)
               {
                  throw new InvalidDestinationException("No such destination: " + dest);
               }

               dm.unregisterDestination(mDest);
            }

            temporaryDestinations.clear();
         }
View Full Code Here

               }

               //
               // Remove temporary destination from the DestinationManager (JBMESSAGING-1215)
               //
               DestinationManager dm = serverPeer.getDestinationManager();

               ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
               if (dm == null)
               {
                  throw new InvalidDestinationException("No such destination: " + dest);
               }

               dm.unregisterDestination(mDest);
            }

            temporaryDestinations.clear();
         }
View Full Code Here

               }

               //
               // Remove temporary destination from the DestinationManager (JBMESSAGING-1215)
               //
               DestinationManager dm = serverPeer.getDestinationManager();

               ManagedDestination mDest = dm.getDestination(dest.getName(), dest.isQueue());
               if (dm == null)
               {
                  throw new InvalidDestinationException("No such destination: " + dest);
               }

               dm.unregisterDestination(mDest);
            }

            temporaryDestinations.clear();
         }
View Full Code Here

            Session.AUTO_ACKNOWLEDGE);

      TemporaryQueue tempQueue = responseSession.createTemporaryQueue();
      log.info("Created TemporaryQueue: " + tempQueue);

      DestinationManager dm = ServerManagement.getDestinationManager();
      Set destinations = dm.getDestinations();
      log.info("Destinations after temp queue creation: " + destinations);

      assertTrue("Temporary destination is not registered in destination manager.", destinations.contains(tempQueue));

      connection.close();

      destinations = dm.getDestinations();
      log.info("Destinations after connection.close(): " + destinations);
      assertTrue("Temporary destination is registered in destination manager.", ! destinations.contains(tempQueue));
   }
View Full Code Here

TOP

Related Classes of org.jboss.jms.server.DestinationManager

Copyright © 2018 www.massapicom. 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.