Package org.hornetq.jms.persistence.config

Examples of org.hornetq.jms.persistence.config.PersistedDestination


   private void printJmsDestinationsAsXML() throws XMLStreamException
   {
      xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATIONS);
      for (Pair<PersistedType, String> jmsDestinationsKey : jmsDestinations.keySet())
      {
         PersistedDestination jmsDestination = jmsDestinations.get(jmsDestinationsKey);
         xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION);

         xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_NAME);
         xmlWriter.writeCharacters(jmsDestination.getName());
         xmlWriter.writeEndElement();

         String selector = jmsDestination.getSelector();
         if (selector != null && selector.length() != 0)
         {
            xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_SELECTOR);
            xmlWriter.writeCharacters(selector);
            xmlWriter.writeEndElement();
         }

         xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_TYPE);
         xmlWriter.writeCharacters(jmsDestination.getType().toString());
         xmlWriter.writeEndElement();


         xmlWriter.writeStartElement(XmlDataConstants.JMS_JNDI_ENTRIES);
         PersistedJNDI jndi = jmsJNDI.get(new Pair<PersistedType, String>(jmsDestination.getType(), jmsDestination.getName()));
         for (String jndiEntry : jndi.getJndi())
         {
            xmlWriter.writeStartElement(XmlDataConstants.JMS_JNDI_ENTRY);
            xmlWriter.writeCharacters(jndiEntry);
            xmlWriter.writeEndElement();
View Full Code Here


      }
   }

   public void deleteDestination(final PersistedType type, final String name) throws Exception
   {
      PersistedDestination destination = destinations.remove(new Pair<PersistedType, String>(type, name));
      if (destination != null)
      {
         jmsJournal.appendDeleteRecord(destination.getId(), false);
      }
   }
View Full Code Here

            cf.setId(id);
            mapFactories.put(cf.getName(), cf);
         }
         else if (rec == DESTINATION_RECORD)
         {
            PersistedDestination destination = new PersistedDestination();
            destination.decode(buffer);
            destination.setId(id);
            destinations.put(new Pair<PersistedType, String>(destination.getType(), destination.getName()), destination);
         }
         else if (rec == JNDI_RECORD)
         {
            PersistedJNDI jndi = new PersistedJNDI();
            jndi.decode(buffer);
View Full Code Here

            HornetQServerLogger.LOGGER.info("Found JMS connection factory: " + cf.getName());
            jmsConnectionFactories.put(cf.getName(), cf);
         }
         else if(rec == JMSJournalStorageManagerImpl.DESTINATION_RECORD)
         {
            PersistedDestination destination = new PersistedDestination();
            destination.decode(buffer);
            destination.setId(id);
            HornetQServerLogger.LOGGER.info("Found JMS destination: " + destination.getName());
            jmsDestinations.put(new Pair<PersistedType, String>(destination.getType(), destination.getName()), destination);
         }
         else if (rec == JMSJournalStorageManagerImpl.JNDI_RECORD)
         {
            PersistedJNDI jndi = new PersistedJNDI();
            jndi.decode(buffer);
View Full Code Here

   private void printJmsDestinationsAsXML() throws XMLStreamException
   {
      xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATIONS);
      for (Pair<PersistedType, String> jmsDestinationsKey : jmsDestinations.keySet())
      {
         PersistedDestination jmsDestination = jmsDestinations.get(jmsDestinationsKey);
         xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION);

         xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_NAME);
         xmlWriter.writeCharacters(jmsDestination.getName());
         xmlWriter.writeEndElement();

         String selector = jmsDestination.getSelector();
         if (selector != null && selector.length() != 0)
         {
            xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_SELECTOR);
            xmlWriter.writeCharacters(selector);
            xmlWriter.writeEndElement();
         }

         xmlWriter.writeStartElement(XmlDataConstants.JMS_DESTINATION_TYPE);
         xmlWriter.writeCharacters(jmsDestination.getType().toString());
         xmlWriter.writeEndElement();


         xmlWriter.writeStartElement(XmlDataConstants.JMS_JNDI_ENTRIES);
         PersistedJNDI jndi = jmsJNDI.get(new Pair<PersistedType, String>(jmsDestination.getType(), jmsDestination.getName()));
         for (String jndiEntry : jndi.getJndi())
         {
            xmlWriter.writeStartElement(XmlDataConstants.JMS_JNDI_ENTRY);
            xmlWriter.writeCharacters(jndiEntry);
            xmlWriter.writeEndElement();
View Full Code Here

               String[] usedJNDI = bindings.toArray(new String[bindings.size()]);
               addToBindings(queueJNDI, queueName, usedJNDI);

               if (storeConfig && durable)
               {
                  storage.storeDestination(new PersistedDestination(PersistedType.Queue,
                                                                    queueName,
                                                                    selectorString,
                                                                    durable));
                  storage.addJNDI(PersistedType.Queue, queueName, usedJNDI);
               }
View Full Code Here

               String[] usedJNDI = bindings.toArray(new String[bindings.size()]);
               addToBindings(topicJNDI, topicName, usedJNDI);

               if (storeConfig)
               {
                  storage.storeDestination(new PersistedDestination(PersistedType.Topic, topicName));
                  storage.addJNDI(PersistedType.Topic, topicName, usedJNDI);
               }
            }
         }
      });
View Full Code Here

      String[] usedJNDI = bindings.toArray(new String[bindings.size()]);
      addToBindings(queueJNDI, queueName, usedJNDI);

      if (storeConfig && durable)
      {
         storage.storeDestination(new PersistedDestination(PersistedType.Queue, queueName, selectorString, durable));
         storage.addJNDI(PersistedType.Queue, queueName, usedJNDI);
      }

      return added;
   }
View Full Code Here

         String[] usedJNDI = bindings.toArray(new String[bindings.size()]);
         addToBindings(topicJNDI, topicName, usedJNDI);

         if (storeConfig)
         {
            storage.storeDestination(new PersistedDestination(PersistedType.Topic, topicName));
            storage.addJNDI(PersistedType.Topic, topicName, usedJNDI);
         }

         return true;
      }
View Full Code Here

               String[] usedJNDI = bindings.toArray(new String[bindings.size()]);
               addToBindings(queueJNDI, queueName, usedJNDI);

               if (storeConfig && durable)
               {
                  storage.storeDestination(new PersistedDestination(PersistedType.Queue,
                                                                    queueName,
                                                                    selectorString,
                                                                    durable));
                  storage.addJNDI(PersistedType.Queue, queueName, usedJNDI);
               }
View Full Code Here

TOP

Related Classes of org.hornetq.jms.persistence.config.PersistedDestination

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.