Examples of StorageId


Examples of org.xmlBlaster.util.queue.StorageId

         QueuePropertyBase sessionProp = new SessionStoreProperty(this.global, this.global.getStrippedId());
         if (sessionProp.getMaxEntries() > 0L) {
            String type = sessionProp.getType();
            String version = sessionProp.getVersion();
            // NEW: "heron", "session", "subPersistence,1.0"
            this.sessionStorageId = new StorageId(glob, this.global.getDatabaseNodeStr(), Constants.RELATING_SESSION,
                  this.info.getId());
            // OLD: "session", "heron/subPersistence,1.0"
            // this.sessionStorageId = new StorageId(glob,
            // Constants.RELATING_SESSION, this.global.getStrippedId() +"/" +
            // this.info.getId());
            // -> OLD: xb_entries.queuename="session_heronsubPersistence,1_0"
            this.sessionStore = this.global.getStoragePluginManager().getPlugin(type, version, this.sessionStorageId, sessionProp);
         }
         else {
            if (log.isLoggable(Level.FINE))
               log.fine(Constants.RELATING_SESSION + " persistence for session is switched off with maxEntries=0");
         }
         QueuePropertyBase subscribeProp = new SubscribeStoreProperty(this.global, this.global.getStrippedId());
         if (subscribeProp.getMaxEntries() > 0L) {
            String type = subscribeProp.getType();
            String version = subscribeProp.getVersion();
            this.subscribeStorageId = new StorageId(glob, this.global.getDatabaseNodeStr(),
                  Constants.RELATING_SUBSCRIBE,
                  this.info.getId());
            // id from xmlBlasterPlugins.xml: "subPersistence,1_0"
            // this.subscribeStorageId = new StorageId(glob,
            // Constants.RELATING_SUBSCRIBE, this.global.getStrippedId() +"/" +
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

      if (sessionInfo.getSessionName().isPubSessionIdInternal()) { // negative pubSessionId?
         log.warning("To use persistent session/subscriptions you should login with a given publicSessionId, see http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.persistence.session.html");
      }

      // Persist it
      StorageId storageId = null;
      if (sessionInfo.getPersistenceUniqueId() == 0) {
         long uniqueId = new Timestamp().getTimestamp(); // new session
         SessionEntry entry = new SessionEntry(connectQosData.toXml(), uniqueId, connectQosData.size(), storageId);
         if (log.isLoggable(Level.FINE)) log.fine("addSession (persistent) for NEW uniqueId: '" + entry.getUniqueId() + "'");
         sessionInfo.setPersistenceUniqueId(uniqueId);
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

      SessionName sn = receiver;
      if (sn != null)
         buf.append(" receiver=").append(sn.getAbsoluteName());
      if (msgUnitWrapperUniqueId > 0)
         buf.append(" msgUnitWrapperUniqueId=").append(msgUnitWrapperUniqueId);
      StorageId si = super.storageId;
      if (si != null)
         buf.append(" storageId=").append(si.getId());
      buf.append(" entryType=").append(super.entryType);
      buf.append(" persistent=").append(super.persistent);
      return buf.toString();
   }
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

         String version = msgUnitStoreProperty.getVersion();
         // ContextNode syntax: "/node/heron/topic/hello" (similar to callback queue)
         // instead of "msgUnitStore:heron_hello"
         // This change would be nice but then existing entries on restart wouldn't be found
         // This syntax is also used in RequestBroker:checkConsistency to reverse lookup the TopicHandler by a given I_Map
         StorageId msgUnitStoreId = new StorageId(serverScope, serverScope.getDatabaseNodeStr(),
               Constants.RELATING_MSGUNITSTORE, getUniqueKey());
         // old xb_entries
         // StorageId msgUnitStoreId = new StorageId(serverScope,
         // Constants.RELATING_MSGUNITSTORE,
         // serverScope.getNodeId()+"/"+getUniqueKey());
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

      QueuePropertyBase prop = this.topicProperty.getHistoryQueueProperty();
      if (queue == null) {
         if (prop.getMaxEntries() > 0L) {
            String type = prop.getType();
            String version = prop.getVersion();
            StorageId queueId = new StorageId(serverScope, serverScope.getDatabaseNodeStr(), queueName, getUniqueKey());
            // StorageId queueId = new StorageId(serverScope, queueName,
            // serverScope.getNodeId()+"/"+getUniqueKey());
            queue = serverScope.getQueuePluginManager().getPlugin(type, version, queueId, prop);
            queue.setNotifiedAboutAddOrRemove(true); // Entries are notified to support reference counting
         }
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

         prop.put("tableNamePrefix", "TEST");
         prop.put("entriesTableName", "_entries");
         this.glob.getProperty().set("QueuePlugin[JDBC][1.0]", pluginInfo.dumpPluginParameters());

         pluginInfo = new PluginInfo(glob, pluginManager, type, "1.0");
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "SomeQueueId");
         this.queue = pluginManager.getPlugin(pluginInfo, queueId, new CbQueueProperty(this.glob, Constants.RELATING_CALLBACK, this.glob.getStrippedId()));
         this.queue.shutdown(); // to allow to initialize again
      }
      catch (Exception ex) {
         log.severe("setUp: error when setting the property 'cb.queue.persistent.tableNamePrefix' to 'TEST'");
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

   protected void setUp() {
      // cleaning up the database from previous runs ...
      QueuePropertyBase prop = null;
      try {
         prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "SomeQueueId");
         queue.initialize(queueId, prop);
         queue.clear();
         queue.shutdown();
      }
      catch (Exception ex) {
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

         prop1.setMaxEntriesCache(max);
         assertEquals(ME+": Wrong capacity", max, prop1.getMaxEntries());
         assertEquals(ME+": Wrong cache capacity", max, prop1.getMaxEntriesCache());
         //PluginInfo pluginInfo = new PluginInfo(glob, null, "");
         //queue.init(glob, pluginInfo);     // Init from pluginloader is first
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "SomeQueueId");
         queue.initialize(queueId, prop1);
         queue.clear(); // this is needed since the tearDown has cleaned the queue with previous cfg (other StorageId)
         assertEquals(ME+": Wrong queue ID", queueId, queue.getStorageId());

         try {
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

         QueuePropertyBase prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
         int max = 1;
         prop.setMaxEntries(max);
         prop.setMaxEntriesCache(max);
         queueType = this.queue.toString();
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "QueuePlugin/size1");
         this.queue.initialize(queueId, prop);
         queue.clear();
         assertEquals(ME + "wrong size before starting ", 0L, queue.getNumOfEntries());
         assertEquals(ME, 1L, queue.getMaxNumOfEntries());
         size1(this.queue);
View Full Code Here

Examples of org.xmlBlaster.util.queue.StorageId

   public void testPutMsg() {
      String queueType = "unknown";
      try {
         QueuePropertyBase prop = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
         queueType = this.queue.toString();
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "QueuePlugin/putMsg");
         this.queue.initialize(queueId, prop);
         queue.clear();
         assertEquals(ME + "wrong size before starting ", 0L, queue.getNumOfEntries());
         putMsg(this.queue);
      }
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.