portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r785930 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/ jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/ jetspeed-portal-resou...
Date Thu, 18 Jun 2009 06:59:28 GMT
Author: rwatler
Date: Thu Jun 18 06:59:28 2009
New Revision: 785930

URL: http://svn.apache.org/viewvc?rev=785930&view=rev
Log:
JS2-1033: preload portal preferences within transaction using new preload() instead of init()
api

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java?rev=785930&r1=785929&r2=785930&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesServiceImpl.java
Thu Jun 18 06:59:28 2009
@@ -116,6 +116,10 @@
         this.preloadEntities = preloadEntities;
     }
     
+    public void init()
+    {
+    }
+
     public void destroy()
     {
         preferenceCache = null;
@@ -450,7 +454,7 @@
         }
     }
 
-    public void init() throws Exception
+    public void preload() throws Exception
     {
         if (preloadedApplications != null)
         {

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java?rev=785930&r1=785929&r2=785930&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java
Thu Jun 18 06:59:28 2009
@@ -36,6 +36,12 @@
 public interface PortletPreferencesProvider extends PortletPreferencesService
 {
     /**
+     * Initializes the preferences node by executing configured preloads.
+     * @throws Exception
+     */
+    void preload() throws Exception;
+    
+    /**
      * Preload all preferences for the given portlet application name into the preferences
cache
      * @param portletApplicationName
      */

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml?rev=785930&r1=785929&r2=785930&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/registry.xml
Thu Jun 18 06:59:28 2009
@@ -122,12 +122,20 @@
     </property>
     <property name="transactionAttributes">
       <props>
+        <prop key="preload">PROPAGATION_REQUIRED</prop>
         <prop key="store*">PROPAGATION_REQUIRED</prop>
         <prop key="*">PROPAGATION_SUPPORTS</prop>
       </props>
     </property>
   </bean>
 
+  <!-- preload preferences provider within transaction -->
+  <bean id="preloadPortletPreferencesProvider" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+    <meta key="j2:cat" value="default or registry" />
+    <property name="targetObject"><ref bean="portletPreferencesProvider"/></property>
+    <property name="targetMethod"><value>preload</value></property>
+  </bean>
+
   <!--
     - PortletEntity is obsolete
     



---------------------------------------------------------------------
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