Examples of IncomingDistributableSessionData


Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

      md.setMaxInactiveInterval(20000);
      ts = Long.valueOf(System.currentTimeMillis());
      sessionData = new MockOutgoingSessionData(id, 1, ts, md, null);
      testee.storeSessionData(sessionData);
     
      IncomingDistributableSessionData incoming = testee.getSessionData(id, true);
      assertEquals(1, incoming.getVersion());
      assertEquals(ts.longValue(), incoming.getTimestamp());
      assertEquals(md.getId(), incoming.getMetadata().getId());
      assertEquals(md.getCreationTime(), incoming.getMetadata().getCreationTime());
      assertEquals(md.isNew(), incoming.getMetadata().isNew());
      assertEquals(md.isValid(), incoming.getMetadata().isValid());
      assertEquals(md.getMaxInactiveInterval(), incoming.getMetadata().getMaxInactiveInterval());
      assertTrue(incoming.providesSessionAttributes());
      assertEquals(attrs, incoming.getSessionAttributes());
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

     
      ts = Long.valueOf(System.currentTimeMillis());
      sessionData = new MockOutgoingSessionData(id, 1, ts, null, null);
      testee.storeSessionData(sessionData);
     
      IncomingDistributableSessionData incoming = testee.getSessionData(id, true);
      assertEquals(1, incoming.getVersion());
      assertEquals(ts.longValue(), incoming.getTimestamp());
      assertEquals(md.getId(), incoming.getMetadata().getId());
      assertEquals(md.getCreationTime(), incoming.getMetadata().getCreationTime());
      assertEquals(md.isNew(), incoming.getMetadata().isNew());
      assertEquals(md.isValid(), incoming.getMetadata().isValid());
      assertEquals(md.getMaxInactiveInterval(), incoming.getMetadata().getMaxInactiveInterval());
      assertTrue(incoming.providesSessionAttributes());
      assertEquals(attrs, incoming.getSessionAttributes());
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

      Map<String, Object> attrs = new HashMap<String, Object>();
      attrs.put("key", "value");
      OutgoingSessionGranularitySessionData sessionData = new MockOutgoingSessionData(id, 1, ts, md, attrs);
      testee.storeSessionData(sessionData);
     
      IncomingDistributableSessionData incoming = testee.getSessionData(id, true);
      assertEquals(1, incoming.getVersion());
      assertEquals(ts.longValue(), incoming.getTimestamp());
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

      Map<String, Object> attrs = new HashMap<String, Object>();
      attrs.put("key", "value");
      OutgoingSessionGranularitySessionData sessionData = new MockOutgoingSessionData(id, 1, ts, md, attrs);
      testee.storeSessionData(sessionData);
     
      IncomingDistributableSessionData incoming = testee.getSessionData(id, true);
      assertEquals(1, incoming.getVersion());
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

   }

   public IncomingDistributableSessionData getSessionData(String realId, boolean includeAttributes)
   {
      ResultSet rst = null;
      IncomingDistributableSessionData incomingSession = null;
      ObjectInputStream attributes_ois = null;

      RuntimeException exception = null;
     
      int numberOfTries = 2;
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

            long ts = -1;
            DistributableSessionMetadata md = null;
            try
            {
               IncomingDistributableSessionData sessionData = proxy_.getSessionData(realId, owner, false);
               if (sessionData == null)
               {
                  log_.debug("Metadata unavailable for unloaded session " + realId);
                  continue;
               }
               ts = sessionData.getTimestamp();
               md = sessionData.getMetadata();
            }
            catch (Exception e)
            {
               // most likely a lock conflict if the session is being updated remotely;
               // ignore it and use default values for timstamp and maxInactive
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

                  {
                     // some one else loaded this
                     return session;
                  }
                                
                  IncomingDistributableSessionData data = proxy_.getSessionData(realId, initialLoad);
                  if (data != null)
                  {
                     session.update(data);
                  }
                  else
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

        
         Long timestamp = store.getSessionTimestamp(realId);
         if (timestamp != null && existing.getUpdateTime() != timestamp.longValue())
         {
            // Timestamp change -- pull in the data
            IncomingDistributableSessionData data = store.getSessionData(entry.getKey(), false);
            if (data != null)
            {
                OwnedSessionUpdate updated = new OwnedSessionUpdate(existing.getOwner(),
                      data.getTimestamp(),
                      data.getMetadata().getMaxInactiveInterval(),
                      existing.isPassivated());
               
                processed.put(realId, updated);
            }
            else
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

         if (initialLoad)
         {
            setupSessionRegion(fqn);
         }
        
         IncomingDistributableSessionData dsd = null;
        
         try
         {
            dsd = getDistributableSessionData(realId, sessionData, true);
         }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData

               {
                  break;
               }
            }
         }
         IncomingDistributableSessionData result = distributedCacheData == null ? null : getDistributableSessionData(realId, distributedCacheData, includeAttributes);
         loadCompleted = true;
         return result;
      }
      catch (Exception e)
      {        
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.