portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r413034 - in /portals/jetspeed-2/trunk: components/portal/src/java/org/apache/jetspeed/ajax/AJAXServiceImpl.java src/webapp/WEB-INF/assembly/ajax.xml
Date Fri, 09 Jun 2006 12:50:48 GMT
Author: ate
Date: Fri Jun  9 05:50:47 2006
New Revision: 413034

URL: http://svn.apache.org/viewvc?rev=413034&view=rev
Log:
(optionally) providing the VelocityEngine used by AJAXServiceImpl through Spring, thereby
also providing proper Velocity logging (JS2-543)
See: http://issues.apache.org/jira/browse/JS2-543

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/ajax/AJAXServiceImpl.java
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax.xml

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/ajax/AJAXServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/ajax/AJAXServiceImpl.java?rev=413034&r1=413033&r2=413034&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/ajax/AJAXServiceImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/ajax/AJAXServiceImpl.java
Fri Jun  9 05:50:47 2006
@@ -49,8 +49,13 @@
 
     public AJAXServiceImpl(Map serviceToBeans)
     {
-        this.serviceToBeans = serviceToBeans;
-        
+        this.serviceToBeans = serviceToBeans;        
+    }
+
+    public AJAXServiceImpl(Map serviceToBeans, VelocityEngine engine)
+    {
+        this.serviceToBeans = serviceToBeans; 
+        this.engine = engine;
     }
 
     public AJAXResponse processRequest(AJAXRequest request)

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax.xml?rev=413034&r1=413033&r2=413034&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax.xml (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/ajax.xml Fri Jun  9 05:50:47 2006
@@ -43,6 +43,21 @@
 		</entry>
 	  </map>
     </constructor-arg>
+    <constructor-arg>
+      <bean class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
+        <property name="velocityProperties">
+           <props>
+           <!-- use webapp-logging CommonsLoggingLog4JLogSystem for logging through IsolatedLog4JLogger
-->
+           <prop key="runtime.log.logsystem.class">org.apache.jetspeed.webapp.logging.velocity.CommonsLoggingLog4JLogSystem</prop>
+           <prop key="runtime.log.logsystem.log4j.category">velocity</prop>
+           <!-- clear out default global VM_global_library.vm leading to ERROR logging
because its not available -->
+           <prop key="velocimacro.library"></prop>
+          </props>
+        </property>
+        <!--  use our own CommonsLoggingLog4JLogSystem specified above, not the default
one provided by Spring -->
+        <property name="overrideLogging"><value>false</value></property>
+      </bean>
+    </constructor-arg>
   </bean>  
 	
 </beans>



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