Package org.xmlBlaster.engine.msgstore

Examples of org.xmlBlaster.engine.msgstore.StoragePluginManager


   public final StoragePluginManager getStoragePluginManager() {
      if (topicStorePluginManager == null) {
         synchronized (StoragePluginManager.class) {
            if (topicStorePluginManager == null)
               topicStorePluginManager = new StoragePluginManager(this);
         }
      }
      return topicStorePluginManager;
   }
View Full Code Here


   protected void setUp() {
      try {
         glob.getProperty().set("topic.queue.persistent.tableNamePrefix", "TEST");

         String type = PLUGIN_TYPES[this.currImpl];
         StoragePluginManager pluginManager = this.glob.getStoragePluginManager();
         // Overwrite JDBC settings from xmlBlaster.properties
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, "JDBC", "1.0");
         java.util.Properties prop = (java.util.Properties)pluginInfo.getParameters();
         prop.put("tableNamePrefix", "TEST");
         prop.put("entriesTableName", "_entries");
         this.glob.getProperty().set("QueuePlugin[JDBC][1.0]", pluginInfo.dumpPluginParameters());

         if (!"JDBC".equals(type))
            pluginInfo = new PluginInfo(glob, pluginManager, type, "1.0");

         MsgUnitStoreProperty storeProp = new MsgUnitStoreProperty(glob, "/node/test");
         StorageId queueId = new StorageId(glob, "msgUnitStore", "SomeMapId");

         this.currMap = pluginManager.getPlugin(pluginInfo, queueId, storeProp);
         this.currMap.clear();
         this.currMap.shutdown(); // to allow to initialize again
      }
      catch (Exception ex) {
         log.severe("setUp: error when setting the property 'topic.queue.persistent.tableNamePrefix' to 'TEST': " + ex.getMessage());
View Full Code Here

         this.contextNode = new ContextNode(ContextNode.MAP_MARKER_TAG, instanceName,
                             this.glob.getContextNode()); // TODO: pass from real parent like TopicInfo
         this.mbeanHandle = this.glob.registerMBean(this.contextNode, this);

         // StoragePluginManager pluginManager = (StoragePluginManager)this.glob.getObjectEntry("org.xmlBlaster.engine.msgstore.StoragePluginManager");
         StoragePluginManager pluginManager = glob.getStoragePluginManager();
         QueuePropertyBase queuePropertyBase = (QueuePropertyBase)userData;

         //instantiate and initialize the underlying queues

         String defaultTransient = pluginProperties.getProperty("transientMap", "RAM,1.0").trim();
         if (defaultTransient.startsWith(getType())) {
            log.severe("Cache storage configured with transientMap=CACHE, to prevent recursion we set it to 'RAM,1.0'");
            defaultTransient = "RAM,1.0";
         }
        
         QueuePropertyBase ramProps = createRamCopy(queuePropertyBase);
         ramProps.setEmbedded(true);
        
         this.transientStore = pluginManager.getPlugin(defaultTransient, uniqueQueueId, ramProps);
         if (log.isLoggable(Level.FINE)) log.fine("Created transient part:" + this.transientStore.toXml(""));
        
         try {
            String defaultPersistent = pluginProperties.getProperty("persistentMap", "JDBC,1.0").trim();
            if (defaultPersistent.startsWith(getType())) {
               log.severe("Cache storage configured with persistentMap=CACHE, to prevent recursion we set it to 'JDBC,1.0'");
               defaultPersistent = "JDBC,1.0";
            }

            boolean oldEmbedded = queuePropertyBase.isEmbedded(); // since a CACHE could be inside a CACHE
            queuePropertyBase.setEmbedded(true);
            this.persistentStore = pluginManager.getPlugin(defaultPersistent, uniqueQueueId, queuePropertyBase);
            queuePropertyBase.setEmbedded(oldEmbedded); // since it is not a clone we make sure to reset it to its original

            this.isConnected = true;
            // to be notified about reconnections / disconnections
//            this.glob.getJdbcQueueManager(this.storageId).registerStorageProblemListener(this);
View Full Code Here

      // TODO: Check if we unregister everything!
      // TODO: Protect each call with catch Throwable
      // we shut down the resources for the queue and storage events
      ServerScope serverScope = requestBroker.getServerScope();
      StoragePluginManager storagePluginManager = serverScope.getStoragePluginManager();
      StorageEventHandler mapEventHandler = storagePluginManager.getEventHandler(uniqueInstanceName);
      if (mapEventHandler != null) {
         storagePluginManager.setEventHandler(uniqueInstanceName, null);
         mapEventHandler.unRegisterEventHelpers(this);
      }

      QueuePluginManager queuePluginManager = serverScope.getQueuePluginManager();
      StorageEventHandler queueEventHandler = queuePluginManager.getEventHandler(uniqueInstanceName);
View Full Code Here

TOP

Related Classes of org.xmlBlaster.engine.msgstore.StoragePluginManager

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.