portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r202114 - in /portals/jetspeed-2/trunk/portal/src: java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java webapp/WEB-INF/assembly/jetspeed-spring.xml
Date Tue, 28 Jun 2005 02:03:08 GMT
Author: taylor
Date: Mon Jun 27 19:03:06 2005
New Revision: 202114

URL: http://svn.apache.org/viewcvs?rev=202114&view=rev
Log:
made WindowValidation optional in the WindowAccessor
the default is disabled, configured in spring-accessor.xml
since I was seeing 16 SQL statements per request being executed against 
the ENTITY and PORTLET table per portlet
The actual number of SQL statements will vary depending on your layout and decorators
This test was run against the most minimal miminal layout

Modified:
    portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java
    portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
    portals/jetspeed-2/trunk/portal/src/webapp/WEB-INF/assembly/jetspeed-spring.xml

Modified: portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java?rev=202114&r1=202113&r2=202114&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java
(original)
+++ portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/container/window/impl/PortletWindowAccessorImpl.java
Mon Jun 27 19:03:06 2005
@@ -47,12 +47,13 @@
    
     private Map windows = new HashMap();
     private PortletEntityAccessComponent entityAccessor;
+    private boolean validateWindows = false;
     
 
-    public PortletWindowAccessorImpl(PortletEntityAccessComponent entityAccessor )
+    public PortletWindowAccessorImpl(PortletEntityAccessComponent entityAccessor, boolean
validateWindows)
     {
         this.entityAccessor = entityAccessor;
-
+        this.validateWindows = validateWindows;
     }
 
     public PortletWindow createPortletWindow(PortletEntity entity, String windowId)
@@ -108,7 +109,10 @@
         }
         else
         {
-            validateWindow(fragment, portletWindow);
+            if (validateWindows)
+            {
+                validateWindow(fragment, portletWindow);
+            }
         }
         
         return portletWindow;

Modified: portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java?rev=202114&r1=202113&r2=202114&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
(original)
+++ portals/jetspeed-2/trunk/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
Mon Jun 27 19:03:06 2005
@@ -295,6 +295,7 @@
      *                  retreive.
      * @return The PortletEntity represented by the current fragment.
      * @throws Exception
+     * @deprecated Please use WindowAccessor to get entities
      */
     public PortletEntity getPortletEntity( ContentFragment f ) throws Exception
     {

Modified: portals/jetspeed-2/trunk/portal/src/webapp/WEB-INF/assembly/jetspeed-spring.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/portal/src/webapp/WEB-INF/assembly/jetspeed-spring.xml?rev=202114&r1=202113&r2=202114&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/portal/src/webapp/WEB-INF/assembly/jetspeed-spring.xml (original)
+++ portals/jetspeed-2/trunk/portal/src/webapp/WEB-INF/assembly/jetspeed-spring.xml Mon Jun
27 19:03:06 2005
@@ -348,6 +348,8 @@
   	   class="org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl"
   >  	   
   	   <constructor-arg ><ref bean="org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent"
/></constructor-arg>
+       <!-- enable window validation -->
+       <constructor-arg type="boolean"><value>false</value></constructor-arg>
   </bean>
   
   <!-- Pluto Portlet Container -->



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