You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2014/07/12 23:37:18 UTC

svn commit: r1610061 - in /portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE: components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/ compone...

Author: taylor
Date: Sat Jul 12 21:37:17 2014
New Revision: 1610061

URL: http://svn.apache.org/r1610061
Log:
JS2-1287: backporting trunk to 2.2.3 release

Added:
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingInfo.java
Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheElementImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/test/assembly/cache-test.xml
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingManager.java
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/cache.xml
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/distributed-ehcache.xml
    portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/ehcache.xml

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheElementImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheElementImpl.java?rev=1610061&r1=1610060&r2=1610061&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheElementImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-cm/src/main/java/org/apache/jetspeed/cache/impl/EhCacheElementImpl.java Sat Jul 12 21:37:17 2014
@@ -16,12 +16,11 @@
  */
 package org.apache.jetspeed.cache.impl;
 
-import java.io.Serializable;
-
 import net.sf.ehcache.Element;
-
 import org.apache.jetspeed.cache.CacheElement;
 
+import java.io.Serializable;
+
 public class EhCacheElementImpl implements CacheElement
 {
 	Element element;

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java?rev=1610061&r1=1610060&r2=1610061&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/main/java/org/apache/jetspeed/aggregator/impl/PortletTrackingManagerImpl.java Sat Jul 12 21:37:17 2014
@@ -16,21 +16,23 @@
  */
 package org.apache.jetspeed.aggregator.impl;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.commons.lang.BooleanUtils;
 import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.aggregator.PortletTrackingInfo;
 import org.apache.jetspeed.aggregator.PortletTrackingManager;
 import org.apache.jetspeed.aggregator.RenderTrackable;
+import org.apache.jetspeed.cache.CacheElement;
+import org.apache.jetspeed.cache.JetspeedCache;
 import org.apache.jetspeed.container.PortletWindow;
 import org.apache.jetspeed.om.portlet.LocalizedField;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * Tracks out of service status for portlets
  *  
@@ -39,7 +41,16 @@ import org.apache.jetspeed.om.portlet.Po
  */
 public class PortletTrackingManagerImpl implements PortletTrackingManager
 {
-    protected Map outOfService = Collections.synchronizedMap(new HashMap());
+    /**
+     * The out of service cache. This cache is keyed off of full portlet name <tt>portletApp::portletName</tt> which
+     * holds as its element a list of windows id strings
+     */
+    protected final JetspeedCache trackingCache;
+
+    /**
+     * Holds failed window ids and their failure counts
+     */
+    protected Map<String,Integer> trackingCounts = new HashMap<String,Integer>();
 
     /**
      * when rendering a portlet, the default timeout period in milliseconds
@@ -54,10 +65,11 @@ public class PortletTrackingManagerImpl 
      */
     protected int outOfServiceLimit;
     
-    public PortletTrackingManagerImpl(long defaultPortletTimeout, int outOfServiceLimit)
+    public PortletTrackingManagerImpl(long defaultPortletTimeout, int outOfServiceLimit, JetspeedCache trackingCache)
     {
         this.defaultPortletTimeout = defaultPortletTimeout;
         this.outOfServiceLimit = outOfServiceLimit;
+        this.trackingCache = trackingCache;
     }
     
     public long getDefaultPortletTimeout()
@@ -67,6 +79,10 @@ public class PortletTrackingManagerImpl 
 
     public boolean exceededTimeout(long renderTime, PortletWindow window)
     {
+        if (!isEnabled()) {
+            return false;
+        }
+
         RenderTrackable trackInfo = (RenderTrackable)window;
         long defaultTimeout = this.getDefaultPortletTimeout();
         if (trackInfo.getExpiration() > 0)
@@ -82,12 +98,29 @@ public class PortletTrackingManagerImpl 
     
     public boolean isOutOfService(PortletWindow window)
     {
+        if (!isEnabled()) {
+            return false;
+        }
+
         RenderTrackable trackable = (RenderTrackable)window;
-        if (trackable.getRenderTimeoutCount() > this.outOfServiceLimit)
+        if (trackable.getRenderTimeoutCount() >= this.outOfServiceLimit)
         {
             return true;
         }
-        
+
+        CacheElement element = trackingCache.get(window.getPortletDefinition().getUniqueName());
+        if (element != null) {
+            List<String> windows = (List<String>)element.getContent();
+            if (windows.contains(window.getWindowId()))
+                return true;
+        }
+
+        Integer count = trackingCounts.get(window.getWindowId());
+        if (count != null && count >= this.outOfServiceLimit) {
+            takeOutOfService(window);
+            return true;
+        }
+
         PortletDefinition def = window.getPortletDefinition();
         Collection<LocalizedField> fields = def.getMetadata().getFields(PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_OUT_OF_SERVICE);
         
@@ -95,6 +128,7 @@ public class PortletTrackingManagerImpl 
         {
             if (BooleanUtils.toBoolean(fields.iterator().next().getValue()))
             {
+                addToCache(window);
                 return true;
             }
         }
@@ -109,13 +143,29 @@ public class PortletTrackingManagerImpl 
     
     public void incrementRenderTimeoutCount(PortletWindow window)
     {
+        if (!isEnabled()) {
+            return;
+        }
         RenderTrackable trackable = (RenderTrackable)window;
-        trackable.incrementRenderTimeoutCount();       
+        trackable.incrementRenderTimeoutCount();
+        Integer count = trackingCounts.get(window.getWindowId());
+        if (count == null) {
+            trackingCounts.put(window.getWindowId(), 1);
+        }
+        else {
+            count = count + 1;
+            trackingCounts.put(window.getWindowId(), count);
+        }
     }
    
     public void success(PortletWindow window)
     {
+        if (!isEnabled()) {
+            return ;
+        }
         RenderTrackable trackable = (RenderTrackable)window;
+        removeFromCache(window);
+        trackingCounts.remove(window.getWindowId());
         trackable.success();
     }
     
@@ -128,31 +178,90 @@ public class PortletTrackingManagerImpl 
     public void takeOutOfService(PortletWindow window)
     {
         RenderTrackable trackable = (RenderTrackable)window;
+        addToCache(window);
+        trackingCounts.remove(window.getWindowId());
         trackable.setRenderTimeoutCount((int)this.defaultPortletTimeout + 1);
     }
     
     public void putIntoService(PortletWindow window)
     {
         RenderTrackable trackable = (RenderTrackable)window;
+        removeFromCache(window);
+        trackingCounts.remove(window.getWindowId());
         trackable.setRenderTimeoutCount(0);        
     }
     
-    public void putIntoService(List fullPortletNames)
+    public void putIntoService(List<String> fullPortletNames)
     {
-        // TODO
+        for (String fullName : fullPortletNames) {
+            trackingCache.remove(fullName);
+        }
     }
     
-    public List getOutOfServiceList(String fullPortletName)
+    public PortletTrackingInfo getOutOfServiceList(String fullPortletName)
     {
-        List outs = new ArrayList();
-        // TODO
-        return outs;
+        CacheElement element = trackingCache.get(fullPortletName);
+        if (element != null) {
+            List<String> windows = (List<String>)element.getContent();
+            return new PortletTrackingInfo(fullPortletName, windows);
+        }
+        else {
+            List<String> windows = new ArrayList<String>();
+            return new PortletTrackingInfo(fullPortletName, windows);
+        }
     }
     
-    public List getOutOfServiceList()
+    public List<PortletTrackingInfo> getOutOfServiceList()
     {
-        List outs = new ArrayList();
-        // TODO
-        return outs;
+        List<PortletTrackingInfo> result = new ArrayList<PortletTrackingInfo>();
+        List<String> keys = trackingCache.getKeys();
+        for (String fullName : keys) {
+            CacheElement element = trackingCache.get(fullName);
+            if (element != null) {
+                List<String> windows = (List<String>) element.getContent();
+                result.add(new PortletTrackingInfo(fullName, windows));
+            }
+        }
+        return result;
+    }
+
+    protected boolean addToCache(PortletWindow window) {
+        String fullName = window.getPortletDefinition().getUniqueName();
+        CacheElement cachedElement = trackingCache.get(fullName);
+        if (cachedElement == null) {
+            List<String> windowIds = new ArrayList<String>();
+            windowIds.add(window.getWindowId());
+            cachedElement = trackingCache.createElement(fullName, windowIds);
+            trackingCache.put(cachedElement);
+            return true;
+        }
+        else {
+            List<String> windowIds = (List<String>)cachedElement.getContent();
+            if (!windowIds.contains(window.getWindowId())) {
+                windowIds.add(window.getWindowId());
+                trackingCache.put(cachedElement);
+                return true;
+            }
+        }
+        return false;
+    }
+
+    protected boolean removeFromCache(PortletWindow window) {
+        String fullName = window.getPortletDefinition().getUniqueName();
+        CacheElement cachedElement = trackingCache.get(fullName);
+        if (cachedElement == null) {
+            return false;
+        }
+        List<String> windowIds = (List<String>)cachedElement.getContent();
+        if (!windowIds.contains(window.getWindowId())) {
+            windowIds.remove(window.getWindowId());
+            trackingCache.put(cachedElement);
+            return true;
+        }
+        return false;
+    }
+
+    public  boolean isEnabled() {
+        return defaultPortletTimeout > 0;
     }
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/test/assembly/cache-test.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/test/assembly/cache-test.xml?rev=1610061&r1=1610060&r2=1610061&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/test/assembly/cache-test.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/components/jetspeed-portal/src/test/assembly/cache-test.xml Sat Jul 12 21:37:17 2014
@@ -162,6 +162,8 @@
         </property>
         <property name="cacheName" value="desktopContentCache" />
     </bean>
+
+
     
     <bean id="portletApplicationOidCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
         <meta key="j2:cat" value="default or cache" />
@@ -329,5 +331,35 @@
         <meta key="j2:cat" value="default or cache"/>
         <constructor-arg><ref bean="ehPageManagerPrincipalPropertiesPathCache"/></constructor-arg>
     </bean>
-    
+
+    <!--
+      Abstract Factory bean used to make a reference to the existing EHCache with the specified name
+      or instantiate a new EHCache when the cache hasn't been defined in ehcache.xml.
+      All the properties except of cacheManager are applied only when a new EHCache is instantiated.
+    -->
+    <bean id="ehCacheParent" abstract="true" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default or cache" />
+        <property name="cacheManager" ref="cacheManager" />
+        <property name="maxElementsInMemory" value="500" />
+        <property name="maxElementsOnDisk" value="1000" />
+        <property name="eternal" value="false" />
+        <property name="overflowToDisk" value="false" />
+        <property name="timeToLive" value="120" />
+        <property name="timeToIdle" value="120" />
+        <property name="diskPersistent" value="false" />
+        <property name="diskExpiryThreadIntervalSeconds" value="120" />
+    </bean>
+
+    <bean id="ehPortletTrackingCache" parent="ehCacheParent">
+        <meta key="j2:cat" value="default or cache" />
+        <property name="cacheName" value="portletTrackingCache" />
+    </bean>
+
+    <bean id="portletTrackingCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default or cache" />
+        <constructor-arg>
+            <ref bean="ehPortletTrackingCache" />
+        </constructor-arg>
+    </bean>
+
 </beans>

Added: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingInfo.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingInfo.java?rev=1610061&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingInfo.java (added)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingInfo.java Sat Jul 12 21:37:17 2014
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.aggregator;
+
+import java.util.List;
+
+/**
+ * Portlet Tracking information used in PortletTrackingManager to represent minimal data passed between the tracking
+ * manager and clients of the API
+ *
+ */
+public class PortletTrackingInfo {
+
+    private final List<String> windows;
+    private final String fullPortletName;
+
+    public PortletTrackingInfo(String fullPortletName, List<String> windows) {
+        this.windows = windows;
+        this.fullPortletName = fullPortletName;
+    }
+
+    public String getFullPortletName() {
+        return fullPortletName;
+    }
+
+    public List<String> getWindows() {
+        return windows;
+    }
+}

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingManager.java?rev=1610061&r1=1610060&r2=1610061&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingManager.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-api/src/main/java/org/apache/jetspeed/aggregator/PortletTrackingManager.java Sat Jul 12 21:37:17 2014
@@ -16,16 +16,21 @@
  */
 package org.apache.jetspeed.aggregator;
 
-import java.util.List;
-
 import org.apache.jetspeed.container.PortletWindow;
 
+import java.util.List;
+
 
 /**
- * <h4>PortletRendererService<br />
- * Jetspeed-2 Rendering service.</h4>
- * <p>This service process all portlet rendering requests and interfaces with the portlet
- * container to generate the resulting markup</p>
+ * The Portlet Tracking Manager will track portlets rendering statistics, taking portlets out of
+ * service when their rendering time exceeds a configurable threshold. This threshold has two parameters:
+ * <tt>defaultPortletTimeout</tt> is a value in milliseconds representing the maximum render time to be considered
+ * as a timeout for a given portlet window. <tt>outOfServiceLimit</tt> represents the number of times the portlet window
+ * reaches the timeout threshold before it is taken out of service.
+ * <p>
+ * This service is used primarily by the rendering engine to determine whether to take a portlet window out of
+ * service to avoid long 'timeouts' when rendering a portlet. The service also provides functions to put the
+ * portlet windows back into service.
  *
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id: $
@@ -33,39 +38,101 @@ import org.apache.jetspeed.container.Por
 public interface PortletTrackingManager
 {
     /**
-     *  Get the default timeout for rendering a portlet in milliseconds
+     * Returns the default timeout threshold for rendering a portlet in milliseconds. This threshold is used to
+     * determine if the portlet has timed out, and is used in combination with <code>getOutOfServiceLimit</code>
      *
+     * @return the default rendering timeout
      */
     long getDefaultPortletTimeout();
 
     /**
-     * Out of service limit, if a portlet entity times out past its limit (or default limit) n consecutive times,
-     *  it is taken out of service
-     *  
-     * @return
+     * The number of times a portlet window can timeout before it is taken out of service
+     *
+     * @return the number of times a portlet window can time out before it is considered out of service
      */
     int getOutOfServiceLimit();
-    
+
+    /**
+     * Ask if a given window is out of service or not
+     * @param window this window will be checked
+     * @return <tt>true</tt> when the portlet window is determined to be out of service
+     */
     boolean isOutOfService(PortletWindow window);
-    
+
+    /**
+     * Given a render time, ask if the given portlet window has exceeded the timeout threshold
+     *
+     * @param renderTime the time it took to render a portlet
+     * @param window this window will be checked
+     * @return <tt>true</tt> when the render time exceeded the timeout threshold
+     */
     boolean exceededTimeout(long renderTime, PortletWindow window);
-    
+
+    /**
+     * Increment the render timeout count for a given portlet window
+     * @param window the portlet window to be incremented
+     */
     void incrementRenderTimeoutCount(PortletWindow window);
 
+    /**
+     * Set a specific caching expiration timeout for a given portlet window
+     *
+     * @param window this window will have a new expiration timeout value
+     * @param expiration the value of the timeout expiration
+     */
     void setExpiration(PortletWindow window, long expiration);
-    
+
+    /**
+     * Reset this portlet window as successfully rendered, clearing all expiration counts
+     *
+     * @param window this window will have its expiration status reset
+     */
     void success(PortletWindow window);
-      
+
+    /**
+     * Take a given portlet window out of service. This portlet window will no longer be rendered.
+     *
+     * @param window this window will be taken out of service
+     */
     void takeOutOfService(PortletWindow window);
-    
+
+    /**
+     * Put a given portlet window that is out of service back into service and re-enable rendering of the window
+     *
+     * @param window this window will be put back into service
+     */
     void putIntoService(PortletWindow window);
+
+    /**
+     *  Given a list of full portlet names in format of <tt>portletApp::portletName</tt>, put all windows back
+     *  into service for each of the portlet names given. Note that a portlet can have many windows associated with it.
+     *  Each of the windows associated with a given portlet will be put back into service.
+     *
+     * @param fullPortletNames a list of strings of full portlet names in format <tt>portletApp::portletName</tt>
+     */
+    void putIntoService(List<String> fullPortletNames);
+
+    /**
+     * Retrieve the list of out of service portlet windows for a given portlet, or an empty <code>PortletTrackingInfo</code>
+     * if none are found
+     *
+     * @param fullPortletName a full portlet names in format <tt>portletApp::portletName</tt>
+     * @return a single <code>PortletTrackingInfo</code> which includes a list of window ids
+     */
+    PortletTrackingInfo getOutOfServiceList(String fullPortletName);
+
+    /**
+     * Retrieve the list of out of service portlet windows for the entire system
+     *
+     * @return a list of portlet windows represented by <code>PortletTrackingInfo</code>
+     */
+    List<PortletTrackingInfo> getOutOfServiceList();
+
     /**
-     * 
-     * @param fullPortletNames a list of Strings of full portlet names
+     * Returns <tt>true</tt> if this service is enabled, otherwise <tt>false</tt>. The service is enabled via the
+     * <tt>jetspeed.properties</tt> property named <tt>portal.core.aggregator.portlet.timeout</tt>. The value
+     * represents the timeout threshold in milliseconds. A value of zero disables portlet tracking.
+     * @return <tt>true</tt> if this service is enabled, otherwise <tt>false</tt>
      */
-    void putIntoService(List fullPortletNames);
-    
-    List getOutOfServiceList(String fullPortletName);
-    
-    List getOutOfServiceList();
+    boolean isEnabled();
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml?rev=1610061&r1=1610060&r2=1610061&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml Sat Jul 12 21:37:17 2014
@@ -31,6 +31,7 @@
     <constructor-arg index="1">
       <value>${portal.core.aggregator.portlet.service.limit}</value>
     </constructor-arg>
+    <constructor-arg index="2"><ref bean="portletTrackingCache"/></constructor-arg>
   </bean>
 
 

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/cache.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/cache.xml?rev=1610061&r1=1610060&r2=1610061&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/cache.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/assembly/cache.xml Sat Jul 12 21:37:17 2014
@@ -317,5 +317,17 @@
         <constructor-arg><ref bean="decorationContentCache"/></constructor-arg>
         <constructor-arg><ref bean="ContentCacheKeyGenerator"/></constructor-arg>
     </bean>
-    
+
+    <bean id="ehPortletTrackingCache" parent="ehCacheParent">
+        <meta key="j2:cat" value="default or cache" />
+        <property name="cacheName" value="portletTrackingCache" />
+    </bean>
+
+    <bean id="portletTrackingCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default or cache" />
+        <constructor-arg>
+            <ref bean="ehPortletTrackingCache" />
+        </constructor-arg>
+    </bean>
+
 </beans>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/distributed-ehcache.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/distributed-ehcache.xml?rev=1610061&r1=1610060&r2=1610061&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/distributed-ehcache.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/distributed-ehcache.xml Sat Jul 12 21:37:17 2014
@@ -431,7 +431,21 @@
           timeToLiveSeconds="3600"
           memoryStoreEvictionPolicy="LRU">
    </cache>
-   
+
+    <cache name="portletTrackingCache"
+           maxElementsInMemory="1000"
+           eternal="true"
+           overflowToDisk="false"
+           timeToIdleSeconds="0"
+           timeToLiveSeconds="0"
+           memoryStoreEvictionPolicy="LRU">
+        <cacheEventListenerFactory
+            class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
+            properties="replicateAsynchronously=true, replicatePuts=true,
+                            replicateUpdates=true, replicateUpdatesViaCopy=true,
+                            replicateRemovals=true"/>
+    </cache>
+
     <!--
     Sample distributed cache named sampleDistributedCache1.
     This cache replicates using defaults.

Modified: portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/ehcache.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/ehcache.xml?rev=1610061&r1=1610060&r2=1610061&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/ehcache.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-BRANCH-2.2.2-POST-RELEASE/jetspeed-portal-resources/src/main/resources/db-ojb/ehcache.xml Sat Jul 12 21:37:17 2014
@@ -408,7 +408,15 @@
           timeToLiveSeconds="3600"
           memoryStoreEvictionPolicy="LRU">
    </cache>
-   
+
+    <cache name="portletTrackingCache"
+           maxElementsInMemory="1000"
+           eternal="true"
+           overflowToDisk="false"
+           timeToIdleSeconds="0"
+           timeToLiveSeconds="0"
+           memoryStoreEvictionPolicy="LRU"/>
+
     <!--
     Sample distributed cache named sampleDistributedCache1.
     This cache replicates using defaults.



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org