portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r773300 - in /portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE: ./ applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/ applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/ applications/j2-...
Date Sun, 10 May 2009 03:04:42 GMT
Author: taylor
Date: Sun May 10 03:04:42 2009
New Revision: 773300

URL: http://svn.apache.org/viewvc?rev=773300&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-997
cache monitor

Added:
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/CacheMonitorPortlet.java   (with props)
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/CacheMonitorResources.properties   (with props)
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/view/cache/
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/view/cache/cacheMonitor.jsp   (with props)
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/CacheMonitorStateImpl.java   (with props)
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/JetspeedCacheMonitorImpl.java   (with props)
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/CacheMonitorState.java   (with props)
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/JetspeedCacheMonitor.java   (with props)
Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/.classpath
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/etc/editors/m2.classpath
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/cache.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/jetspeed-services.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/statistics.psml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/pages/Administrative/statistics.psml

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/.classpath
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/.classpath?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/.classpath (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/.classpath Sun May 10 03:04:42 2009
@@ -116,7 +116,7 @@
 	<classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.7.0.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/commons-betwixt/jars/commons-betwixt-20061115.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/ant/jars/ant-1.6.5.jar"/>
-	<classpathentry kind="var" path="MAVEN_REPO/ehcache/jars/ehcache-1.2.4.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/ehcache/jars/ehcache-1.5.0.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/portlet-api/jars/portlet-api-1.0.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/jmock/jars/jmock-cglib-1.1.0.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/asm/jars/asm-2.2.jar"/>

Added: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/CacheMonitorPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/CacheMonitorPortlet.java?rev=773300&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/CacheMonitorPortlet.java (added)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/CacheMonitorPortlet.java Sun May 10 03:04:42 2009
@@ -0,0 +1,86 @@
+/*
+ * 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.portlets.cache;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.cache.JetspeedCacheMonitor;
+import org.apache.portals.bridges.common.GenericServletPortlet;
+
+/**
+ * Jetspeed Cache Monitor Portlet
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public class CacheMonitorPortlet extends GenericServletPortlet
+{
+    private JetspeedCacheMonitor cacheMonitor;
+    public static final String ALL = "(all)";
+    
+    public void init(PortletConfig config)
+    throws PortletException 
+    {
+        super.init(config);
+        cacheMonitor = (JetspeedCacheMonitor) getPortletContext().getAttribute(CommonPortletServices.CPS_CACHE_MONITOR);
+        if (null == cacheMonitor)
+        {
+            throw new PortletException("Failed to find the Cache Monitor on portlet initialization");
+        }        
+    }
+    
+    
+    public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException,
+    IOException
+    {
+        String cacheName = actionRequest.getParameter("cacheNameCalc");
+        if (cacheName != null)
+        {
+            if (cacheName.equals(ALL))
+            {
+                cacheMonitor.calculateStatistics();
+            }
+            else
+            {
+                cacheMonitor.calculateStatistics(cacheName);
+            }
+        }
+        else
+        {
+            cacheName = actionRequest.getParameter("cacheNameReset");
+            if (cacheName != null)
+            {
+                if (cacheName.equals(ALL))
+                {
+                    cacheMonitor.resetStatistics();
+                }
+                else
+                {
+                    cacheMonitor.resetStatistics(cacheName);
+                }
+                
+            }            
+        }
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/CacheMonitorPortlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/CacheMonitorPortlet.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/CacheMonitorResources.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/CacheMonitorResources.properties?rev=773300&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/CacheMonitorResources.properties (added)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/CacheMonitorResources.properties Sun May 10 03:04:42 2009
@@ -0,0 +1,38 @@
+# 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.
+#
+# $Id$
+#
+
+# DO NOT TRANSLATE & DO NOT INCLUDE IN L10N PROPERTIES FILE
+cachemonitor.table.title=Jetspeed Cache Monitor
+cachemonitor.label.name=Cache Name
+cachemonitor.label.maxmemory=Max-Memory
+cachemonitor.label.maxdisk=Max-Disk
+cachemonitor.label.idle=Time-Idle
+cachemonitor.label.live=Time-Live
+cachemonitor.label.memsize=Mem-Count
+cachemonitor.label.disksize=Disk-Count
+cachemonitor.label.inmemsize=In-Mem-Size
+cachemonitor.label.hits=Cache-Hits
+cachemonitor.label.misses=Misses
+cachemonitor.label.evictions=Evictions
+cachemonitor.label.objects=Objects
+cachemonitor.label.avgget=Avg-Get-Ms
+cachemonitor.action.calculate=Calculate
+cachemonitor.action.reset=Reset
+cachemonitor.action.calculate.all=Calculate All
+cachemonitor.action.reset.all=Reset All
+

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/CacheMonitorResources.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/java/org/apache/jetspeed/portlets/cache/resources/CacheMonitorResources.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml Sun May 10 03:04:42 2009
@@ -145,6 +145,7 @@
         <js:service name='ImporterManager'/>
         <js:service name='AuditActivity'/>
         <js:service name='JetspeedSerializerFactory'/>
+		<js:service name='CacheMonitor'/>        
 	</js:services>
 
 </portlet-app>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/portlet.xml?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/portlet.xml Sun May 10 03:04:42 2009
@@ -1941,7 +1941,29 @@
                 <value>/_content/menu.html</value>
             </preference>
         </portlet-preferences>
-   </portlet>  
+   </portlet>
+   
+	<portlet id="CacheMonitor">
+		<description>Monitor the Jetspeed Caches.</description>
+		<portlet-name>CacheMonitor</portlet-name>
+		<display-name>Cache Monitor</display-name>
+		<portlet-class>org.apache.jetspeed.portlets.cache.CacheMonitorPortlet</portlet-class>
+		<init-param>
+			<name>ViewPage</name>
+			<value>/WEB-INF/view/cache/cacheMonitor.jsp</value>
+		</init-param>
+		<supports>
+			<mime-type>text/html</mime-type>
+			<portlet-mode>VIEW</portlet-mode>
+		</supports>
+		<supported-locale>en</supported-locale>
+		<resource-bundle>org.apache.jetspeed.portlets.cache.resources.CacheMonitorResources</resource-bundle>
+		<portlet-info>
+			<title>Cache Monitor</title>
+			<short-title>Cache</short-title>
+			<keywords>cache,monitor,memory,admin</keywords>
+		</portlet-info>
+	</portlet>
 
    <custom-portlet-mode>
         <description>a Custom Edit_defaults Mode</description>            

Added: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/view/cache/cacheMonitor.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/view/cache/cacheMonitor.jsp?rev=773300&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/view/cache/cacheMonitor.jsp (added)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/view/cache/cacheMonitor.jsp Sun May 10 03:04:42 2009
@@ -0,0 +1,101 @@
+<%--
+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.
+
+--%>
+<%@page import="java.util.List"%>
+<%@page import="java.text.DecimalFormat"%>
+<%@page import="java.text.NumberFormat"%>
+<%@page import="org.apache.jetspeed.cache.JetspeedCacheMonitor"%>
+<%@page import="org.apache.jetspeed.cache.CacheMonitorState"%>
+<%@page import="org.apache.jetspeed.CommonPortletServices"%>
+<%@page import="org.apache.jetspeed.portlets.cache.CacheMonitorPortlet"%>
+<%@ page contentType="text/html" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+
+<portlet:defineObjects/>
+<fmt:setBundle basename="org.apache.jetspeed.portlets.cache.resources.CacheMonitorResources" />
+
+   <p>   
+ 	<%
+ 	JetspeedCacheMonitor cacheMonitor = (JetspeedCacheMonitor)portletConfig.getPortletContext().getAttribute(CommonPortletServices.CPS_CACHE_MONITOR);
+ 	List<CacheMonitorState> states = cacheMonitor.snapshotStatistics();
+  	%>
+<table style="border-collapse: collapse; width: 350px; margin-top: 8px; float: left;">
+	<tr>
+		<th class="portlet-section-header" colspan="17"><fmt:message key="cachemonitor.table.title"/></th>
+	</tr>
+
+     <tr>
+      <th class="portlet-section-subheader"><fmt:message key="cachemonitor.label.name"/></td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.maxmemory"/></td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.maxdisk"/></td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.idle"/></td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.live"/></td>
+      <th class="portlet-section-subheader">&nbsp;</td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.memsize"/></td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.disksize"/></td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.avgget"/></td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.hits"/></td>
+      <th class="portlet-section-subheader"style="text-align: right"><fmt:message key="cachemonitor.label.misses"/></td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.evictions"/></td>
+      <th class="portlet-section-subheader">&nbsp;</td>
+      <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.inmemsize"/></td>
+      <th class="portlet-section-subheader">&nbsp;</td>
+      <th class="portlet-section-subheader">&nbsp;</td>
+      <th class="portlet-section-subheader">&nbsp;</td>
+     </tr>
+<%
+NumberFormat pf = new DecimalFormat("##0.000");
+NumberFormat nf = new DecimalFormat("###,###,##0");
+
+for (CacheMonitorState state : states)
+{
+%>     
+	
+     <tr>
+       <td class="portlet-section-body"><%=state.getCacheName()%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getMaxElementsInMemory())%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getMaxElementsOnDisk())%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getTimeToIdle())%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getTimeToLive())%></td>
+       <td class="portlet-section-body">&nbsp;</td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getMemoryStoreSize())%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getDiskStoreSize())%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=pf.format(state.getAverageGetTime())%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getCacheHits())%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getCacheMisses())%></td>
+	   <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getEvictionCount())%></td>
+       <td class="portlet-section-body">&nbsp;</td>
+       <td class="portlet-section-body" style="text-align: right"><%=nf.format(state.getInMemorySize())%></td>
+	   <td class="portlet-section-body"><a href="<portlet:actionURL><portlet:param name='cacheNameCalc' value='<%=state.getCacheName()%>'/></portlet:actionURL>"><fmt:message key="cachemonitor.action.calculate"/></a></td>
+       <td class="portlet-section-body">&nbsp;</td>
+	   <td class="portlet-section-body"><a href="<portlet:actionURL><portlet:param name='cacheNameReset' value='<%=state.getCacheName()%>'/></portlet:actionURL>"><fmt:message key="cachemonitor.action.reset"/></a></td>
+     </tr>
+<%
+}
+%>
+	<tr>
+		<th class="portlet-section-header" colspan="17"></th>
+	</tr>
+	<tr>
+	<td class="portlet-section-body' colspan="17">
+	<a href="<portlet:actionURL><portlet:param name='cacheNameCalc' value='<%=CacheMonitorPortlet.ALL%>'/></portlet:actionURL>"><fmt:message key="cachemonitor.action.calculate.all"/></a>
+	<a href="<portlet:actionURL><portlet:param name='cacheNameReset' value='<%=CacheMonitorPortlet.ALL%>'/></portlet:actionURL>"><fmt:message key="cachemonitor.action.reset.all"/></a>
+	</td>
+    </tr>
+</table>
+    

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/view/cache/cacheMonitor.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/j2-admin/src/webapp/WEB-INF/view/cache/cacheMonitor.jsp
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/CacheMonitorStateImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/CacheMonitorStateImpl.java?rev=773300&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/CacheMonitorStateImpl.java (added)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/CacheMonitorStateImpl.java Sun May 10 03:04:42 2009
@@ -0,0 +1,215 @@
+/*
+ * 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.cache.impl;
+
+import org.apache.jetspeed.cache.CacheMonitorState;
+
+
+public class CacheMonitorStateImpl implements CacheMonitorState
+{
+    private String name;
+    private float averageGetTime;
+    private long cacheHits;
+    private long cacheMisses;
+    private long diskStoreSize;
+    private long evictionCount;
+    private long inMemoryHits;
+    private long inMemorySize;
+    private long memoryStoreSize;
+    private long objectCount;
+    private long size;
+    private long onDiskHits;  
+    private long maxElementsInMemory;
+    private long maxElementsOnDisk;
+    private long timeToIdle;
+    private long timeToLive;
+    
+    public CacheMonitorStateImpl(String name)
+    {
+        this.name = name;
+    }
+
+    public String getCacheName()
+    {
+        return name;
+    }
+    
+    public float getAverageGetTime()
+    {
+        return averageGetTime;
+    }
+
+    public long getCacheHits()
+    {
+        return cacheHits;
+    }
+
+    public long getCacheMisses()
+    {
+        return cacheMisses;
+    }
+
+    public long getDiskStoreSize()
+    {
+        return diskStoreSize;
+    }
+
+    public long getEvictionCount()
+    {
+        return evictionCount;
+    }
+
+    public long getInMemoryHits()
+    {
+        return inMemoryHits;
+    }
+
+    public long getInMemorySize()
+    {
+        return inMemorySize;
+    }
+
+    public long getMemoryStoreSize()
+    {
+        return memoryStoreSize;
+    }
+
+    public long getObjectCount()
+    {
+        return objectCount;
+    }
+    
+    public long getSize()
+    {
+        return size;
+    }
+
+    public long getOnDiskHits()
+    {
+        return onDiskHits;
+    }
+    
+    
+    public long getMaxElementsInMemory()
+    {
+        return maxElementsInMemory;
+    }
+
+    public long getMaxElementsOnDisk()
+    {
+        return maxElementsOnDisk;
+    }
+    
+    public long getTimeToIdle()
+    {
+        return timeToIdle;
+    }
+
+    public long getTimeToLive()
+    {
+        return timeToLive;
+    }        
+    
+    protected void setAverageGetTime(float averageGetTime)
+    {
+        this.averageGetTime = averageGetTime;
+    }
+
+    
+    protected void setCacheHits(long cacheHits)
+    {
+        this.cacheHits = cacheHits;
+    }
+
+    
+    protected void setCacheMisses(long cacheMisses)
+    {
+        this.cacheMisses = cacheMisses;
+    }
+
+    
+    protected void setDiskStoreSize(long diskStoreSize)
+    {
+        this.diskStoreSize = diskStoreSize;
+    }
+
+    
+    protected void setEvictionCount(long evictionCount)
+    {
+        this.evictionCount = evictionCount;
+    }
+
+    
+    protected void setInMemoryHits(long inMemoryHits)
+    {
+        this.inMemoryHits = inMemoryHits;
+    }
+
+    
+    protected void setInMemorySize(long inMemorySize)
+    {
+        this.inMemorySize = inMemorySize;
+    }
+
+    
+    protected void setMemoryStoreSize(long memoryStoreSize)
+    {
+        this.memoryStoreSize = memoryStoreSize;
+    }
+
+    
+    protected void setObjectCount(long objectCount)
+    {
+        this.objectCount = objectCount;
+    }
+
+    
+    protected void setSize(long size)
+    {
+        this.size = size;
+    }
+
+    
+    protected void setOnDiskHits(long onDiskHits)
+    {
+        this.onDiskHits = onDiskHits;
+    }
+ 
+    
+    protected void setMaxElementsInMemory(long maxElementsInMemory)
+    {
+        this.maxElementsInMemory = maxElementsInMemory;
+    }
+
+    
+    protected void setMaxElementsOnDisk(long maxElementsOnDisk)
+    {
+        this.maxElementsOnDisk = maxElementsOnDisk;
+    }
+
+    
+    protected void setTimeToIdle(long timeToIdle)
+    {
+        this.timeToIdle = timeToIdle;
+    }
+
+    protected void setTimeToLive(long timeToLive)
+    {
+        this.timeToLive = timeToLive;
+    }
+    
+}
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/CacheMonitorStateImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/CacheMonitorStateImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/JetspeedCacheMonitorImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/JetspeedCacheMonitorImpl.java?rev=773300&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/JetspeedCacheMonitorImpl.java (added)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/JetspeedCacheMonitorImpl.java Sun May 10 03:04:42 2009
@@ -0,0 +1,156 @@
+/*
+ * 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.cache.impl;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.Statistics;
+
+import org.apache.jetspeed.cache.CacheMonitorState;
+import org.apache.jetspeed.cache.JetspeedCacheMonitor;
+
+public class JetspeedCacheMonitorImpl implements JetspeedCacheMonitor
+{
+    private CacheManager cacheManager;
+    private boolean calculateObjectCount = false;
+    private Map calculatedStates = Collections.synchronizedMap(new HashMap()); 
+    
+    public JetspeedCacheMonitorImpl(CacheManager cacheManager)
+    {
+        this.cacheManager = cacheManager;
+    }
+    
+    public List snapshotStatistics()
+    {
+        return snapshotAndCalculateStatistics(false) ;
+    }
+
+    public CacheMonitorState snapshotStatistics(String cacheName)
+    {
+        return snapshotAndCalculateStatistics(cacheName, false) ;
+    }
+    
+    public List calculateStatistics()
+    {
+        return snapshotAndCalculateStatistics(true);        
+    }
+    
+    public CacheMonitorState calculateStatistics(String cacheName)
+    {
+        return snapshotAndCalculateStatistics(cacheName, true);
+    }
+    
+    public void resetStatistics()
+    {
+        String[]names = cacheManager.getCacheNames();
+        for (int ix = 0; ix < names.length; ix++)
+        {
+            resetStatistics(names[ix]);
+        }
+    }
+
+    public void resetStatistics(String cacheName)
+    {
+        Cache cache = cacheManager.getCache(cacheName);
+        cache.clearStatistics();
+        calculatedStates.remove(cacheName);
+    }
+ 
+    protected List snapshotAndCalculateStatistics(boolean calculate)
+    {
+        List states = new LinkedList();        
+        String[]names = cacheManager.getCacheNames();
+        for (int ix = 0; ix < names.length; ix++)
+        {
+            states.add(snapshotAndCalculateStatistics(names[ix], calculate));
+        }
+        return states;        
+    }
+    
+    protected CacheMonitorState snapshotAndCalculateStatistics(String name, boolean calculate)
+    {
+        Cache cache = cacheManager.getCache(name);        
+        CacheMonitorStateImpl state = new CacheMonitorStateImpl(name);
+        Statistics statistics = cache.getStatistics();        
+        state.setMemoryStoreSize(cache.getMemoryStoreSize());
+        if (calculate)
+        {
+            state.setInMemorySize(cache.calculateInMemorySize());
+            if (calculateObjectCount)
+            {
+                state.setObjectCount(statistics.getObjectCount());
+            }
+            else
+            {
+                state.setObjectCount(0);
+            }
+            calculatedStates.put(name, new CalculatedState(state.getInMemorySize(), state.getObjectCount()));
+        }
+        else
+        {
+            CalculatedState cs = (CalculatedState)calculatedStates.get(name);
+            if (cs == null)
+            {
+                state.setInMemorySize(0);                
+                state.setObjectCount(0);
+            }
+            else
+            {
+                state.setInMemorySize(cs.inMemorySize);
+                state.setObjectCount(cs.objectCount);
+            }            
+        }
+        state.setSize(cache.getSize());
+        state.setDiskStoreSize(cache.getDiskStoreSize()); 
+        state.setAverageGetTime(statistics.getAverageGetTime());
+        state.setCacheHits(statistics.getCacheHits());
+        state.setCacheMisses(statistics.getCacheMisses());
+        state.setEvictionCount(statistics.getEvictionCount());
+        state.setInMemoryHits(statistics.getInMemoryHits());
+        state.setOnDiskHits(statistics.getOnDiskHits());
+        state.setMaxElementsInMemory(cache.getCacheConfiguration().getMaxElementsInMemory());
+        state.setMaxElementsOnDisk(cache.getCacheConfiguration().getMaxElementsOnDisk());            
+        state.setTimeToIdle(cache.getCacheConfiguration().getTimeToIdleSeconds());
+        state.setTimeToLive(cache.getCacheConfiguration().getTimeToLiveSeconds());
+        return state;
+    }
+    
+    protected CacheManager getCacheManager()
+    {
+        return cacheManager;
+    }
+    
+    class CalculatedState implements Serializable
+    {
+        private long inMemorySize;
+        private long objectCount;
+        
+        CalculatedState(long inMemorySize, long objectCount)
+        {
+            this.inMemorySize = inMemorySize;
+            this.objectCount = objectCount;
+        }
+    }
+    
+}
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/JetspeedCacheMonitorImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/cm/src/java/org/apache/jetspeed/cache/impl/JetspeedCacheMonitorImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/etc/editors/m2.classpath
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/etc/editors/m2.classpath?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/etc/editors/m2.classpath (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/etc/editors/m2.classpath Sun May 10 03:04:42 2009
@@ -113,7 +113,7 @@
     <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils-bean-collections/1.7.0/commons-beanutils-bean-collections-1.7.0.jar"/>
     <classpathentry kind="var" path="M2_REPO/commons-betwixt/commons-betwixt/20061115/commons-betwixt-20061115.jar"/>
     <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
-    <classpathentry kind="var" path="M2_REPO/ehcache/ehcache/1.2.4/ehcache-1.2.4.jar"/>
+    <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.5.0/ehcache-1.5.0.jar"/>
     <classpathentry kind="var" path="M2_REPO/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"/>
     <classpathentry kind="var" path="M2_REPO/jmock/jmock-cglib/1.2.0/jmock-cglib-1.2.0.jar"/>
     <classpathentry kind="var" path="M2_REPO/myfaces/myfaces-api/1.1.5/myfaces-api-1.1.5.jar"/>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/CommonPortletServices.java Sun May 10 03:04:42 2009
@@ -55,5 +55,6 @@
     public final static String CPS_PORTLET_CACHE = "cps:portletContentCache";
     public final static String CPS_AUDIT_ACTIVITY = "cps:AuditActivity";
     public final static String CPS_JETSPEED_SERIALIZER_FACTORY = "cps:JetspeedSerializerFactory";
-    public final static String CPS_PORTLET_APPLICATION_MANAGER = "cps:PAM";       
+    public final static String CPS_PORTLET_APPLICATION_MANAGER = "cps:PAM";
+    public final static String CPS_CACHE_MONITOR = "cps:CacheMonitor";           
 }
\ No newline at end of file

Added: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/CacheMonitorState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/CacheMonitorState.java?rev=773300&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/CacheMonitorState.java (added)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/CacheMonitorState.java Sun May 10 03:04:42 2009
@@ -0,0 +1,110 @@
+/*
+ * 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.cache;
+
+/**
+ * <p>
+ *  Individual cache information and state to provide to Jetspeed Cache Monitor
+ * </p>
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public interface CacheMonitorState
+{
+    /**
+     * @return the name of the cache
+     */
+    String getCacheName();
+
+    /**
+     * @return the number of elements in the memory cache
+     */    
+    long getMemoryStoreSize();
+
+    /**
+     * @return the size of the memory store for this cache
+     */    
+    long getInMemorySize();
+    
+    /**
+     * @return the entire size of the cache including the number of elements in the memory store plus the number of elements in the disk store
+     */
+    long getSize();
+    
+    /**
+     * @return the number of elements in the disk store
+     */
+    long getDiskStoreSize();
+
+    /**
+     * @return the average time to retrieve a cache element in milliseconds
+     */
+    float getAverageGetTime();
+    
+    /**
+     * @return the number of times a requested item was found in the cache.
+     */
+    long getCacheHits();
+
+    /**
+     * @return the number of times a requested element was not found in the cache
+     */    
+    long getCacheMisses();
+    
+    /**
+     * @return the number of cache evictions, since the cache was created, or statistics were cleared
+     */    
+    long getEvictionCount();
+    
+    /**
+     * @return the number of times a requested item was found in memory 
+     */    
+    long getInMemoryHits();
+    
+    /**
+     * @return gets the number of elements stored in the cache. Caclulating this can be expensive. 
+     * Accordingly, this method will return three different values, depending on the statistics accuracy setting
+     */    
+    long getObjectCount();
+    
+    /**
+     * @return the number of times a requested element was not found in the cache
+     */    
+    long getOnDiskHits();
+    
+    /**
+     * @return get configured maximum elements in memory
+     */
+    long getMaxElementsInMemory();
+
+    /**
+     * @return get configured maximum elements on disk
+     */
+    long getMaxElementsOnDisk();
+    
+    /**
+     * @return get configured time to idle in seconds before expiring
+     */
+    long getTimeToIdle();
+
+    /**
+     * @return get configured time to live in seconds before expiring
+     */
+    long getTimeToLive();
+}
+ 
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/CacheMonitorState.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/CacheMonitorState.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/JetspeedCacheMonitor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/JetspeedCacheMonitor.java?rev=773300&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/JetspeedCacheMonitor.java (added)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/JetspeedCacheMonitor.java Sun May 10 03:04:42 2009
@@ -0,0 +1,74 @@
+/*
+ * 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.cache;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Monitor active Jetspeed Caches by retrieving snapshots of cache statistics, recalculating cache statistics, and resetting the cache statistics
+ *  Warning, the methods calculateStatistics can be computationally expensive 
+ * </p>
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id$
+ */
+public interface JetspeedCacheMonitor
+{
+    /**
+     * Retrieve a snapshot of all cache states and statistics
+     * 
+     * @return a list of cache states of type CacheMonitorState
+     */
+    List snapshotStatistics();
+    
+    /**
+     * Retrieve a snapshot of a single cache states and statistics without performing expensive object count calculations
+     * 
+     * @param cacheName the name of the cache
+     * @return a single cache statistics snapshot
+     */    
+    CacheMonitorState snapshotStatistics(String cacheName);
+    
+    /**
+     * Reset the statistics for all caches
+     */
+    void resetStatistics();
+    
+    /**
+     * Reset the statistics for the given cache
+     * 
+     * @param cacheName the name of the cache
+     */
+    void resetStatistics(String cacheName);
+    
+    /**
+     * Recalculate the statistics for all caches, including cache size calculations. This may take considerable amount of time depending on the size of the caches.
+     * @return new statistics list freshly calculated of type CacheMonitorState
+     */
+    List calculateStatistics();
+    
+    /**
+     * Recalculate the statistics for the given cache, including cache size calculations. This may take considerable amount of time depending on the size of the caches.
+     * 
+     * @param cacheName the name of the cache
+     * @return new statistics freshly calculated
+     */
+    CacheMonitorState calculateStatistics(String cacheName);    
+    
+}
+ 
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/JetspeedCacheMonitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/jetspeed-api/src/java/org/apache/jetspeed/cache/JetspeedCacheMonitor.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/cache.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/cache.xml?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/cache.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/cache.xml Sun May 10 03:04:42 2009
@@ -29,6 +29,12 @@
         <property name="configLocation" ref="cacheManagerConfig"/>
 	</bean>
 
+    <bean id="org.apache.jetspeed.cache.CacheMonitor" class="org.apache.jetspeed.cache.impl.JetspeedCacheMonitorImpl">
+        <constructor-arg index="0">
+            <ref bean="cacheManager" />
+        </constructor-arg>
+    </bean>
+
 	<!-- Factory bean used to instantiate a EHCache with the specified name (and corresponding
 		configuration in cacheManager.xml -->
 	<bean id="ehPortletContentCache"

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/jetspeed-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/jetspeed-services.xml?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/jetspeed-services.xml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/assembly/jetspeed-services.xml Sun May 10 03:04:42 2009
@@ -129,6 +129,9 @@
           <entry key="JetspeedSerializerFactory">
           	<ref bean="org.apache.jetspeed.serializer.JetspeedSerializerFactory"/>
           </entry>
+        <entry key="CacheMonitor">
+        	<ref bean="org.apache.jetspeed.cache.CacheMonitor" />
+        </entry>          
 <!-- first uncomment the below service bean in security-spi-atn.xml
          <entry key="PasswordEncodingService">
            <ref bean="org.apache.jetspeed.security.PasswordEncodingService" />

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/statistics.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/statistics.psml?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/statistics.psml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/min-pages/Administrative/portal-admin/statistics.psml Sun May 10 03:04:42 2009
@@ -22,6 +22,13 @@
   <title>Portal Statistics</title>
 
   <fragment id="stats-2" type="layout" name="jetspeed-layouts::VelocityOneColumn">
-    <fragment id="stats-3" type="portlet" name="j2-admin::StatisticsPortlet" />
+    <fragment id="stats-3" type="portlet" name="j2-admin::StatisticsPortlet" >
+            <property name="row" value="1"/>
+            <property name="column" value="0"/>
+	</fragment>        
+	<fragment id="stats-4" type="portlet" name="j2-admin::CacheMonitor">
+            <property name="row" value="0"/>
+            <property name="column" value="0"/>
+    </fragment>        
   </fragment>
 </page>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/pages/Administrative/statistics.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/pages/Administrative/statistics.psml?rev=773300&r1=773299&r2=773300&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/pages/Administrative/statistics.psml (original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/src/webapp/WEB-INF/pages/Administrative/statistics.psml Sun May 10 03:04:42 2009
@@ -27,6 +27,13 @@
   <title>Portal Statistics</title>
 
   <fragment id="stats-2" type="layout" name="jetspeed-layouts::VelocityOneColumn">
-    <fragment id="stats-3" type="portlet" name="j2-admin::StatisticsPortlet" />
+    <fragment id="stats-3" type="portlet" name="j2-admin::StatisticsPortlet" >
+            <property name="row" value="1"/>
+            <property name="column" value="0"/>
+	</fragment>    
+	<fragment id="stats-4" type="portlet" name="j2-admin::CacheMonitor">
+            <property name="row" value="0"/>
+            <property name="column" value="0"/>
+    </fragment>    
   </fragment>
 </page>



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


Mime
View raw message