cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r586258 [1/3] - in /cocoon/trunk/blocks: cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/ cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/ cocoon-fl...
Date Fri, 19 Oct 2007 04:19:31 GMT
Author: vgritsenko
Date: Thu Oct 18 21:19:27 2007
New Revision: 586258

URL: http://svn.apache.org/viewvc?rev=586258&view=rev
Log:
switching to commons logging

Modified:
    cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/AppleController.java
    cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/ApplesProcessor.java
    cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/JSErrorReporter.java
    cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java
    cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/AbstractFormsAction.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java
    cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/CocoonContinuationContext.java
    cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java
    cocoon/trunk/blocks/cocoon-naming/cocoon-naming-impl/src/main/java/org/apache/cocoon/transformation/LDAPTransformer.java
    cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java
    cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/HSSFElementProcessorFactory.java
    cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/serialization/HSSFSerializer.java
    cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonLanguage.java
    cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonProgram.java
    cocoon/trunk/blocks/cocoon-repository/cocoon-repository-impl/src/main/java/org/apache/cocoon/components/repository/RepositoryManager.java
    cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/acting/LinkTranslatorMapAction.java
    cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_Cocoon.java
    cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_JavaScriptInterpreter.java
    cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/JavaScriptAspectWeaver.java
    cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/ws/WebServiceLoader.java
    cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/selection/DateSelector.java
    cocoon/trunk/blocks/cocoon-taglib/cocoon-taglib-impl/src/main/java/org/apache/cocoon/transformation/TagTransformer.java
    cocoon/trunk/blocks/cocoon-web3/cocoon-web3-impl/src/main/java/org/apache/cocoon/components/web3/impl/Web3DataSourceSelectorImpl.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/acting/ServerPagesAction.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/classloader/RepositoryClassLoader.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/AbstractMarkupLanguage.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/CocoonMarkupLanguage.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/Logicsheet.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/LogicsheetCodeGenerator.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/AbstractEsqlConnection.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/AbstractEsqlQuery.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/XSPGenerator.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/markup/xsp/XSPMarkupLanguage.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/programming/AbstractProgrammingLanguage.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/programming/CompiledProgrammingLanguage.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/programming/java/AbstractJavaCompiler.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/programming/java/JavaProgram.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/programming/java/NullFormatter.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/programming/javascript/JavascriptLanguage.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/language/programming/javascript/JavascriptProgram.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/components/xscript/XScriptManagerImpl.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/generation/AbstractServerPage.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/generation/ServerPagesGenerator.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/xsp/handler/AbstractComponentHandler.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/xsp/handler/AbstractFactoryHandler.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/xsp/handler/ComponentEnvironment.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/xsp/handler/ComponentFactory.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/xsp/handler/NonThreadSafePoolableComponentHandler.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/xsp/handler/SingleThreadedComponentHandler.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/java/org/apache/cocoon/xsp/handler/ThreadSafeComponentHandler.java
    cocoon/trunk/blocks/cocoon-xsp/cocoon-xsp-impl/src/main/resources/org/apache/cocoon/components/language/markup/xsp/java/log.xsl

Modified: cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/AppleController.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/AppleController.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/AppleController.java (original)
+++ cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/AppleController.java Thu Oct 18 21:19:27 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.cocoon.components.flow.apples;
 
-import org.apache.cocoon.components.flow.apples.AppleRequest;
-import org.apache.cocoon.components.flow.apples.AppleResponse;
-
 /**
  * AppleController declares the main processing interfaces for the stateful
  * controller objects.
@@ -28,6 +25,7 @@
  * @version $Id$
  */
 public interface AppleController {
+
     /**
      * Allows the AppleController implementation to make some business
      * decissions in a given web application flow.

Modified: cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/ApplesProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/ApplesProcessor.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/ApplesProcessor.java (original)
+++ cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/ApplesProcessor.java Thu Oct 18 21:19:27 2007
@@ -22,6 +22,8 @@
 import org.apache.avalon.framework.context.DefaultContext;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
+import org.springframework.web.context.WebApplicationContext;
+
 import org.apache.cocoon.components.LifecycleHelper;
 import org.apache.cocoon.components.flow.AbstractInterpreter;
 import org.apache.cocoon.components.flow.ContinuationsDisposer;
@@ -33,7 +35,6 @@
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.Response;
 import org.apache.cocoon.spring.configurator.WebAppContextUtils;
-import org.springframework.web.context.WebApplicationContext;
 
 /**
  * ApplesProcessor is the core Cocoon component that provides the 'Apples' flow
@@ -41,10 +42,11 @@
  *
  * @version $Id$
  */
-public class ApplesProcessor extends AbstractInterpreter implements ContinuationsDisposer {
+public class ApplesProcessor extends AbstractInterpreter
+                             implements ContinuationsDisposer {
 
     /**
-     * @see org.apache.cocoon.components.flow.Interpreter#callFunction(java.lang.String, java.util.List, org.apache.cocoon.environment.Redirector)
+     * @see org.apache.cocoon.components.flow.Interpreter#callFunction(String, List, Redirector)
      */
     public void callFunction(String className, List params, Redirector redirector) throws Exception {
         // Get the current web application context
@@ -58,8 +60,9 @@
         WebContinuation wk = null;
         if (!(app instanceof StatelessAppleController)) {
             wk = this.continuationsMgr.createWebContinuation(app, null, 0, getInterpreterID(), this);
-            if (getLogger().isDebugEnabled())
+            if (getLogger().isDebugEnabled()) {
                 getLogger().debug("Instantiated a stateful apple, continuationid = " + wk.getId());
+            }
         }
 
         DefaultContext appleContext = new DefaultContext(avalonContext);
@@ -67,7 +70,8 @@
             appleContext.put("continuation-id", wk.getId());
         }
 
-        LifecycleHelper.setupComponent(app, getLogger(), appleContext, sitemapManager, null, true);
+        LifecycleHelper.setupComponent(app, getLogger(), appleContext, sitemapManager, null);
+
         processApple(params, redirector, app, wk);
     }
 
@@ -88,7 +92,8 @@
         processApple(params, redirector, app, wk);
     }
 
-    protected AppleController instantiateController(String appleName, ServiceManager sitemapManager) throws AppleNotFoundException {
+    protected AppleController instantiateController(String appleName, ServiceManager sitemapManager)
+    throws AppleNotFoundException {
     	if(appleName.startsWith("#")) {
     		String beanName = appleName.substring(1);
     		try {
@@ -99,11 +104,10 @@
     			throw new AppleNotFoundException("Can't find any bean of name '" + beanName + "'.", e);
 			}
     	}
-        AppleController appleController = null;
+        AppleController appleController;
 		try {
 			Class clazz = Thread.currentThread().getContextClassLoader().loadClass(appleName);
-	        Object o = clazz.newInstance();
-	        appleController = (AppleController) o;
+	        appleController = (AppleController) clazz.newInstance();
 		} catch (ClassNotFoundException e) {
 			throw new AppleNotFoundException("Can't find a class of name '" + appleName + "'.", e);
 		} catch (InstantiationException e) {
@@ -115,7 +119,7 @@
     }
 
     private void processApple(List params, Redirector redirector, AppleController app, WebContinuation wk)
-            throws Exception {
+    throws Exception {
         Request cocoonRequest = ObjectModelHelper.getRequest(this.processInfoProvider.getObjectModel());
         AppleRequest req = new DefaultAppleRequest(params, cocoonRequest);
         Response cocoonResponse = ObjectModelHelper.getResponse(this.processInfoProvider.getObjectModel());

Modified: cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/JSErrorReporter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/JSErrorReporter.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/JSErrorReporter.java (original)
+++ cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/JSErrorReporter.java Thu Oct 18 21:19:27 2007
@@ -16,9 +16,10 @@
 */
 package org.apache.cocoon.components.flow.javascript;
 
-import org.apache.avalon.framework.logger.Logger;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.util.location.Location;
 import org.apache.cocoon.util.location.LocationImpl;
+
 import org.mozilla.javascript.ErrorReporter;
 import org.mozilla.javascript.EvaluatorException;
 import org.mozilla.javascript.tools.ToolErrorReporter;
@@ -30,14 +31,14 @@
  *
  * @version $Id$
  */
-public class JSErrorReporter implements ErrorReporter
-{
-  private Logger logger;
+public class JSErrorReporter extends AbstractLogEnabled
+                             implements ErrorReporter {
+
   private Location location;
   private StringBuffer message;
 
-  public JSErrorReporter(Logger logger) {
-      this.logger = logger;
+
+  public JSErrorReporter() {
   }
   
   private void appendMessage(String text, String sourceName, int line, int column) {
@@ -60,7 +61,7 @@
                                       sourceName, line, lineSrc, column);
       appendMessage(errMsg, sourceName, line, column);
       System.err.println(errMsg);
-      logger.error(errMsg);
+      getLogger().error(errMsg);
   }
 
   public void warning(String message, String sourceName, int line,
@@ -70,7 +71,7 @@
                                     sourceName, line, lineSrc, column);
       appendMessage(errMsg, sourceName, line, column);
       System.err.println(errMsg);
-      logger.warn(errMsg);
+      getLogger().warn(errMsg);
   }
     
   public EvaluatorException runtimeError(String message, String sourceName,

Modified: cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java (original)
+++ cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java Thu Oct 18 21:19:27 2007
@@ -31,13 +31,16 @@
 import java.util.Set;
 
 import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.web.context.WebApplicationContext;
+
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.LifecycleHelper;
 import org.apache.cocoon.components.flow.ContinuationsManager;
-import org.apache.cocoon.components.flow.WebContinuation;
 import org.apache.cocoon.components.flow.Interpreter.Argument;
+import org.apache.cocoon.components.flow.WebContinuation;
 import org.apache.cocoon.configuration.Settings;
 import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
 import org.apache.cocoon.environment.ObjectModelHelper;
@@ -47,6 +50,7 @@
 import org.apache.cocoon.environment.Session;
 import org.apache.cocoon.spring.configurator.WebAppContextUtils;
 import org.apache.cocoon.util.ClassUtils;
+
 import org.mozilla.javascript.JavaScriptException;
 import org.mozilla.javascript.NativeJavaClass;
 import org.mozilla.javascript.NativeJavaObject;
@@ -56,7 +60,6 @@
 import org.mozilla.javascript.Undefined;
 import org.mozilla.javascript.Wrapper;
 import org.mozilla.javascript.continuations.Continuation;
-import org.springframework.web.context.WebApplicationContext;
 
 /**
  * Implementation of FOM (Flow Object Model).
@@ -72,7 +75,6 @@
         WebApplicationContext webAppContext;
         FOM_JavaScriptInterpreter interpreter;
         Redirector redirector;
-        Logger logger;
         Scriptable request;
         Scriptable response;
         Scriptable session;
@@ -88,14 +90,12 @@
                            Redirector redirector,
                            WebApplicationContext waContext,
                            Context avalonContext,
-                           Logger logger,
                            WebContinuation lastContinuation) {
             this.caller = caller;
             this.interpreter = interp;
             this.redirector = redirector;
             this.webAppContext = waContext;
             this.avalonContext = avalonContext;
-            this.logger = logger;
             this.lastContinuation = lastContinuation;
             if (lastContinuation != null) {
                 fwk = new FOM_WebContinuation(lastContinuation);
@@ -171,7 +171,7 @@
             if (log != null) {
                 return log;
             }
-            log = org.mozilla.javascript.Context.toObject(logger, getParentScope());
+            log = org.mozilla.javascript.Context.toObject(getLogger(), getParentScope());
             return log;
         }
 
@@ -188,9 +188,13 @@
         }
     }
 
+
+    private final Log logger = LogFactory.getLog(getClass());
+
     private CallContext currentCall;
     protected PageLocalScopeHolder pageLocal;
 
+
     public String getClassName() {
         return "FOM_Cocoon";
     }
@@ -211,11 +215,9 @@
     }
 
     public void pushCallContext(FOM_JavaScriptInterpreter interp,
-                         Redirector redirector,
-                         ServiceManager manager,
-                         Context avalonContext,
-                         Logger logger,
-                         WebContinuation lastContinuation) {
+                                Redirector redirector,
+                                Context avalonContext,
+                                WebContinuation lastContinuation) {
         if (pageLocal == null) {
             pageLocal = new PageLocalScopeHolder(getTopLevelScope(this));
         }
@@ -224,8 +226,7 @@
         final WebApplicationContext appContext = WebAppContextUtils.getCurrentWebApplicationContext();
 
         this.currentCall = new CallContext(currentCall, interp, redirector, appContext,
-                                           avalonContext,
-                                           logger, lastContinuation);
+                                           avalonContext, lastContinuation);
     }
 
     public void popCallContext() {
@@ -329,7 +330,7 @@
      *
      * @param component a component
      */
-    public void jsFunction_releaseComponent( Object component ) throws Exception {
+    public void jsFunction_releaseComponent(Object component) throws Exception {
         // this will be done by Spring
     }
 
@@ -366,14 +367,12 @@
      * @throws Exception if something goes wrong during setup.
      */
     public Object jsFunction_setupObject(Object obj) throws Exception {
-        LifecycleHelper.setupComponent(
-             unwrap(obj),
-             this.getLogger(),
-             this.getAvalonContext(),
-             (ServiceManager)currentCall.webAppContext.getBean(AvalonUtils.SERVICE_MANAGER_ROLE),
-             null,// configuration
-             true);
-         return org.mozilla.javascript.Context.javaToJS(obj, getParentScope());
+        LifecycleHelper.setupComponent(unwrap(obj),
+                                       getLogger(),
+                                       getAvalonContext(),
+                                       (ServiceManager) currentCall.webAppContext.getBean(AvalonUtils.SERVICE_MANAGER_ROLE),
+                                       null /* configuration */);
+        return org.mozilla.javascript.Context.javaToJS(obj, getParentScope());
     }
 
     /**
@@ -688,8 +687,8 @@
         return currentCall.avalonContext;
     }
 
-    private Logger getLogger() {
-        return currentCall.logger;
+    private Log getLogger() {
+        return logger;
     }
 
     private FOM_JavaScriptInterpreter getInterpreter() {
@@ -734,7 +733,7 @@
      */
     public void handleContinuation(String kontId, Scriptable parameters)
         throws Exception {
-        List list = null;
+        List list;
         if (parameters == null || parameters == Undefined.instance) {
             parameters = getParameters();
         }

Modified: cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java (original)
+++ cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java Thu Oct 18 21:19:27 2007
@@ -411,8 +411,7 @@
         // request. Everything else remains the same.
         ClassLoader contextClassloader = Thread.currentThread().getContextClassLoader();
         thrScope.setupPackages(contextClassloader);
-        cocoon.pushCallContext(this, redirector, manager,
-                               avalonContext, getLogger(), null);
+        cocoon.pushCallContext(this, redirector, avalonContext, null);
 
         // Check if we need to compile and/or execute scripts
         synchronized (compiledScripts) {
@@ -548,7 +547,7 @@
         context.setOptimizationLevel(OPTIMIZATION_LEVEL);
         context.setGeneratingDebug(true);
         context.setCompileFunctionsWithDynamicScope(true);
-        context.setErrorReporter(new JSErrorReporter(getLogger()));
+        context.setErrorReporter(new JSErrorReporter());
 
         LocationTrackingDebugger locationTracker = new LocationTrackingDebugger();
         if (!enableDebugger) {
@@ -654,9 +653,7 @@
                 Thread.currentThread().setContextClassLoader(kScope.getClassLoader());
                 cocoon = (FOM_Cocoon)kScope.get("cocoon", kScope);
                 kScope.setLock(true);
-                cocoon.pushCallContext(this, redirector, manager,
-                                       avalonContext,
-                                       getLogger(), wk);
+                cocoon.pushCallContext(this, redirector, avalonContext, wk);
 
                 // Register the current scope for scripts indirectly called from this function
                 FOM_JavaScriptFlowHelper.setFOM_FlowScope(cocoon.getObjectModel(), kScope);

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/AbstractFormsAction.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/AbstractFormsAction.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/AbstractFormsAction.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/AbstractFormsAction.java Thu Oct 18 21:19:27 2007
@@ -16,34 +16,38 @@
  */
 package org.apache.cocoon.forms.acting;
 
-import org.apache.cocoon.acting.Action;
-import org.apache.cocoon.forms.FormManager;
 import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
+import org.apache.avalon.framework.thread.ThreadSafe;
+
+import org.apache.cocoon.acting.Action;
+import org.apache.cocoon.forms.FormManager;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * Abstract base class for Cocoon Forms actions.
  * 
  * @version $Id$
  */
-public abstract class AbstractFormsAction 
-  implements Action, ThreadSafe, Serviceable, Disposable {
+public abstract class AbstractFormsAction extends AbstractLogEnabled
+                                          implements Action, ThreadSafe, Serviceable,
+                                                     Disposable {
       
     protected ServiceManager manager;
     
     protected FormManager formManager;
 
+
     public void service(ServiceManager serviceManager) throws ServiceException {
         this.manager = serviceManager;
-        this.formManager = (FormManager)serviceManager.lookup(FormManager.ROLE);
+        this.formManager = (FormManager) serviceManager.lookup(FormManager.ROLE);
     }
 
     public void dispose() {
         if (this.manager != null) {
-            this.manager.release( this.formManager );
+            this.manager.release(this.formManager);
             this.manager = null;
             this.formManager = null;
         }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java Thu Oct 18 21:19:27 2007
@@ -49,7 +49,7 @@
 public class HandleFormSubmitAction extends AbstractFormsAction {
 
     public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters parameters)
-            throws Exception {
+    throws Exception {
         String formSource = parameters.getParameter("form-definition");
         String formAttribute = parameters.getParameter("attribute-name");
         String formHandlerClassName = parameters.getParameter("formhandler", null);
@@ -61,13 +61,13 @@
             Form form = formManager.createForm(source);
 
             Request request = ObjectModelHelper.getRequest(objectModel);
-            FormHandler formHandler = null;
 
+            FormHandler formHandler;
             if (formHandlerClassName != null) {
                 // TODO cache these classes
                 Class clazz = Thread.currentThread().getContextClassLoader().loadClass(formHandlerClassName);
-                formHandler = (FormHandler)clazz.newInstance();
-                LifecycleHelper.setupComponent(formHandler, null, null, manager, null);
+                formHandler = (FormHandler) clazz.newInstance();
+                LifecycleHelper.setupComponent(formHandler, getLogger(), null, manager, null);
                 form.setFormHandler(formHandler);
             }
 
@@ -79,6 +79,7 @@
             if (finished) {
                 return Collections.EMPTY_MAP;
             }
+
             return null;
         } finally {
             resolver.release(source);

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java Thu Oct 18 21:19:27 2007
@@ -122,7 +122,7 @@
             // Register the current scope for scripts indirectly called from this function
             FOM_JavaScriptFlowHelper.setFOM_FlowScope(objectModel, kScope);
             cocoon = (FOM_Cocoon)kScope.get("cocoon", kScope);
-            cocoon.pushCallContext(null, null, this.manager, this.context, getLogger(), wk);
+            cocoon.pushCallContext(null, null, this.context, wk);
         }
 
         try {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java Thu Oct 18 21:19:27 2007
@@ -38,8 +38,9 @@
  * @version $Id$
  */
 public class InitForm1Action extends AbstractFormsAction {
+
     public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
-            throws Exception {
+    throws Exception {
         String formSource = parameters.getParameter("form-definition");
         String formAttribute = parameters.getParameter("attribute-name");
 

Modified: cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/CocoonContinuationContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/CocoonContinuationContext.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/CocoonContinuationContext.java (original)
+++ cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/CocoonContinuationContext.java Thu Oct 18 21:19:27 2007
@@ -20,7 +20,10 @@
 import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.commons.logging.Log;
+
 import org.apache.cocoon.environment.Redirector;
+import org.apache.cocoon.util.avalon.CLLoggerWrapper;
 
 /**
  * Helper class to associate cocoon flow informations to the continuation.
@@ -44,8 +47,8 @@
         return avalonContext;
     }
 
-    public void setLogger(Logger logger) {
-        this.logger = logger;
+    public void setLogger(Log logger) {
+        this.logger = new CLLoggerWrapper(logger);
     }
 
     /** @deprecated Use commons logging */

Modified: cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java (original)
+++ cocoon/trunk/blocks/cocoon-javaflow/cocoon-javaflow-impl/src/main/java/org/apache/cocoon/components/flow/java/JavaInterpreter.java Thu Oct 18 21:19:27 2007
@@ -21,7 +21,12 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+
 import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.commons.javaflow.Continuation;
+import org.apache.commons.javaflow.utils.ReflectionUtils;
+import org.apache.commons.jxpath.JXPathIntrospector;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.flow.AbstractInterpreter;
@@ -29,9 +34,6 @@
 import org.apache.cocoon.components.flow.InvalidContinuationException;
 import org.apache.cocoon.components.flow.WebContinuation;
 import org.apache.cocoon.environment.Redirector;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.utils.ReflectionUtils;
-import org.apache.commons.jxpath.JXPathIntrospector;
 
 /**
  * Implementation of the java flow interpreter.
@@ -68,8 +70,8 @@
         context.setRedirector(redirector);
 
         final Parameters parameters = new Parameters();
-        for(final Iterator i = params.iterator(); i.hasNext();) {
-            final Argument argument = (Argument)i.next();
+        for (final Iterator i = params.iterator(); i.hasNext();) {
+            final Argument argument = (Argument) i.next();
             parameters.setParameter(argument.name, argument.value);
         }
         context.setParameters(parameters);

Modified: cocoon/trunk/blocks/cocoon-naming/cocoon-naming-impl/src/main/java/org/apache/cocoon/transformation/LDAPTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-naming/cocoon-naming-impl/src/main/java/org/apache/cocoon/transformation/LDAPTransformer.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-naming/cocoon-naming-impl/src/main/java/org/apache/cocoon/transformation/LDAPTransformer.java (original)
+++ cocoon/trunk/blocks/cocoon-naming/cocoon-naming-impl/src/main/java/org/apache/cocoon/transformation/LDAPTransformer.java Thu Oct 18 21:19:27 2007
@@ -25,7 +25,6 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Vector;
-
 import javax.naming.Context;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -37,15 +36,17 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.xml.XMLConsumer;
 import org.apache.commons.collections.MapUtils;
 import org.apache.commons.lang.BooleanUtils;
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.xml.XMLConsumer;
+
 import org.xml.sax.Attributes;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
@@ -907,9 +908,6 @@
         return ObjectUtils.toString(object);
     }
 
-    public final Logger getTheLogger() {
-        return getLogger();
-    }
 
     static class LDAPQuery {
 
@@ -999,7 +997,7 @@
             constraints.setCountLimit(count_limit);
         }
 
-        protected void execute() throws Exception, NamingException {
+        protected void execute() throws Exception {
             String[] attrList = new String[attrListe.size()];
 
             AttributesImpl attr = new AttributesImpl();
@@ -1140,7 +1138,7 @@
                                 transformer.start(error_element, attr);
                                 transformer.data("[LDAPTransformer] Error in LDAP-Query: " + e);
                                 transformer.end(error_element);
-                                transformer.getTheLogger().error("[LDAPTransformer] Exception: " + e.toString());
+                                transformer.getLogger().error("[LDAPTransformer] Exception: " + e.toString());
                             }
                         }
                         break;
@@ -1193,7 +1191,7 @@
                                 transformer.start(error_element, attr);
                                 transformer.data("[LDAPTransformer] Error incrementing an attribute: " + e.toString());
                                 transformer.end(error_element);
-                                transformer.getTheLogger().error("[LDAPTransformer] Error incrementing an attribute: " + e.toString());
+                                transformer.getLogger().error("[LDAPTransformer] Error incrementing an attribute: " + e.toString());
                             }
                         }
                         break;
@@ -1202,7 +1200,7 @@
                         try {
                             String[] attrVal = new String[attrVale.size()];
                             String[] attrMode = new String[attrModeVal.size()];
-                            String replaceMode = REPLACE_MODE_DEFAULT;
+                            String replaceMode;
                             attrVale.toArray(attrVal);
                             attrVale.clear();
                             attrModeVal.toArray(attrMode);
@@ -1231,7 +1229,7 @@
                                 if (!filter.equals("")) {
                                     constraints.setReturningAttributes(attrList);
                                     NamingEnumeration ldapresults = ctx.search(searchbase, filter, constraints);
-                                    SearchResult si = null;
+                                    SearchResult si;
                                     /* start indicate element of executing query */
                                     if (!exec_element.equals("")) {
                                         transformer.start(exec_element, attr);
@@ -1258,7 +1256,7 @@
                                                 if (replaceMode.equals(REPLACE_MODE_DEFAULT)) {
                                                     newAttrValue = (String)attrMap.get(attrID);
                                                 } else if (replaceMode.equals(REPLACE_MODE_APPEND)) {
-                                                    newAttrValue = attrValue + (String) attrMap.get(attrID);
+                                                    newAttrValue = attrValue + attrMap.get(attrID);
                                                 }
                                                 newAttrValue = recodeToLDAPEncoding(newAttrValue);
 
@@ -1311,7 +1309,7 @@
                                             if (replaceMode.equals(REPLACE_MODE_DEFAULT)) {
                                                 newAttrValue = (String) attrMap.get(attrID);
                                             } else if (replaceMode.equals(REPLACE_MODE_APPEND)) {
-                                                newAttrValue = attrValue + (String) attrMap.get(attrID);
+                                                newAttrValue = attrValue + attrMap.get(attrID);
                                             }
                                             newAttrValue = recodeToLDAPEncoding(newAttrValue);
 
@@ -1346,7 +1344,7 @@
                                 transformer.start(error_element, attr);
                                 transformer.data("[LDAPTransformer] Error replacing an attribute: " + e.toString());
                                 transformer.end(error_element);
-                                transformer.getTheLogger().error("[LDAPTransformer] Error replacing an attribute: " + e.toString());
+                                transformer.getLogger().error("[LDAPTransformer] Error replacing an attribute: " + e.toString());
                                 if (!row_element.equals("")) {
                                     transformer.end(row_element);
                                 }
@@ -1381,7 +1379,7 @@
                                 if (!filter.equals("")) {
                                     constraints.setReturningAttributes(attrList);
                                     NamingEnumeration ldapresults = ctx.search(searchbase, filter, constraints);
-                                    SearchResult si = null;
+                                    SearchResult si;
                                     /* start indicate element of executing query */
                                     if (!exec_element.equals("")) {
                                         transformer.start(exec_element, attr);
@@ -1517,7 +1515,7 @@
                                 transformer.start(error_element, attr);
                                 transformer.data("[LDAPTransformer] Error replacing an attribute: " + e.toString());
                                 transformer.end(error_element);
-                                transformer.getTheLogger().error("[LDAPTransformer] Error replacing an attribute: " + e.toString());
+                                transformer.getLogger().error("[LDAPTransformer] Error replacing an attribute: " + e.toString());
                                 if (!row_element.equals("")) {
                                     transformer.end(row_element);
                                 }
@@ -1536,7 +1534,7 @@
                     transformer.start(error_element, attr);
                     transformer.data("[LDAPTransformer] Failed ldap-connection to directory service.");
                     transformer.end(error_element);
-                    transformer.getTheLogger().error("[LDAPTransformer] Failed to connect to " + serverurl + e.toString());
+                    transformer.getLogger().error("[LDAPTransformer] Failed to connect to " + serverurl + e.toString());
                 }
             }
             try {
@@ -1548,7 +1546,7 @@
                     transformer.start(error_element, attr);
                     transformer.data("[LDAPTransformer] Failed ldap-disconnection to directory service.");
                     transformer.end(error_element);
-                    transformer.getTheLogger().error("[LDAPTransformer] Failed to disconnect from " + serverurl + e.toString());
+                    transformer.getLogger().error("[LDAPTransformer] Failed to disconnect from " + serverurl + e.toString());
                 }
             }
         }
@@ -1606,30 +1604,30 @@
         }
 
         protected void debugPrint() {
-            Logger logger = transformer.getTheLogger();
+            Log logger = transformer.getLogger();
             if (logger.isDebugEnabled()) {
-                logger.debug("[LDAPTransformer] query_index: " + query_index);
-                logger.debug("[LDAPTransformer] current_state: " + current_state);
-                logger.debug("[LDAPTransformer] serverurl: " + serverurl);
-                logger.debug("[LDAPTransformer] port: " + port);
-                logger.debug("[LDAPTransformer] root_dn: " + root_dn);
-                logger.debug("[LDAPTransformer] password: " + password);
-                logger.debug("[LDAPTransformer] version: " + version);
-                logger.debug("[LDAPTransformer] scope: " + scope);
-                logger.debug("[LDAPTransformer] authentication: " + authentication);
-                logger.debug("[LDAPTransformer] toDo: " + toDo);
-                logger.debug("[LDAPTransformer] searchbase: " + searchbase);
-                logger.debug("[LDAPTransformer] showAttribute: " + showAttribute);
-                logger.debug("[LDAPTransformer] attribute: " + attrListe.toString());
-                logger.debug("[LDAPTransformer] initial-context: " + initialContextValues);
-                logger.debug("[LDAPTransformer] filter: " + filter);
-                logger.debug("[LDAPTransformer] doc_element: " + doc_element);
-                logger.debug("[LDAPTransformer] row_element: " + row_element);
-                logger.debug("[LDAPTransformer] error_element: " + error_element);
-                logger.debug("[LDAPTransformer] sax-error: " + sax_error);
-                logger.debug("[LDAPTransformer] deref_link: " + deref_link);
-                logger.debug("[LDAPTransformer] count_limit: " + count_limit);
-                logger.debug("[LDAPTransformer] time_limit: " + time_limit);
+                logger.debug("query_index: " + query_index);
+                logger.debug("current_state: " + current_state);
+                logger.debug("serverurl: " + serverurl);
+                logger.debug("port: " + port);
+                logger.debug("root_dn: " + root_dn);
+                logger.debug("password: " + password);
+                logger.debug("version: " + version);
+                logger.debug("scope: " + scope);
+                logger.debug("authentication: " + authentication);
+                logger.debug("toDo: " + toDo);
+                logger.debug("searchbase: " + searchbase);
+                logger.debug("showAttribute: " + showAttribute);
+                logger.debug("attribute: " + attrListe.toString());
+                logger.debug("initial-context: " + initialContextValues);
+                logger.debug("filter: " + filter);
+                logger.debug("doc_element: " + doc_element);
+                logger.debug("row_element: " + row_element);
+                logger.debug("error_element: " + error_element);
+                logger.debug("sax-error: " + sax_error);
+                logger.debug("deref_link: " + deref_link);
+                logger.debug("count_limit: " + count_limit);
+                logger.debug("time_limit: " + time_limit);
             }
         }
 

Modified: cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java (original)
+++ cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java Thu Oct 18 21:19:27 2007
@@ -32,8 +32,8 @@
  *
  * @version $Id$
  */
-public abstract class AbstractElementProcessorFactory
-     extends AbstractLogEnabled implements ElementProcessorFactory {
+public abstract class AbstractElementProcessorFactory extends AbstractLogEnabled
+                                                      implements ElementProcessorFactory {
 
     // uses XML element names as keys and ElementProcessor progenitors
     // as values. An ElementProcessor progenitor is an Object that can
@@ -76,14 +76,15 @@
             exception.setElementName(name);
             throw exception;
         }
-        ElementProcessor processor = null;
 
+        ElementProcessor processor;
         try {
             processor = doCreateElementProcessor(progenitor);
         } catch (CannotCreateElementProcessorException e) {
             e.setElementName(name);
             throw e;
         }
+
         return processor;
     }
 
@@ -150,7 +151,6 @@
      * @exception CannotCreateElementProcessorException if the
      *            specified ElementProcessor cannot be created.
      */
-
     protected abstract ElementProcessor doCreateElementProcessor(
         final Object progenitor) throws CannotCreateElementProcessorException;
 
@@ -166,12 +166,10 @@
      * @exception CannotCreateElementProcessorException if the
      *            ElementProcessor cannot be created.
      */
+    protected ElementProcessor createNewElementProcessorInstance(final Class progenitor)
+    throws CannotCreateElementProcessorException {
 
-    protected ElementProcessor createNewElementProcessorInstance(
-            final Class progenitor)
-            throws CannotCreateElementProcessorException {
-        ElementProcessor rval = null;
-
+        ElementProcessor rval;
         try {
             rval = (ElementProcessor)progenitor.newInstance();
             if (rval instanceof AbstractLogEnabled) {
@@ -217,12 +215,10 @@
      * @exception CannotCreateElementProcessorException if the
      *            ElementProcessor cannot be created.
      */
+    protected ElementProcessor constructElementProcessor(final Constructor progenitor)
+    throws CannotCreateElementProcessorException {
 
-    protected ElementProcessor constructElementProcessor(
-            final Constructor progenitor)
-            throws CannotCreateElementProcessorException {
-        ElementProcessor rval = null;
-
+        ElementProcessor rval;
         try {
             rval = (ElementProcessor) progenitor.newInstance(new Object[0]);
             if (rval instanceof AbstractLogEnabled) {
@@ -255,5 +251,4 @@
         }
         return rval;
     }
-
-}       // end public abstract class AbstractElementProcessorFactory
+}

Modified: cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/HSSFElementProcessorFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/HSSFElementProcessorFactory.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/HSSFElementProcessorFactory.java (original)
+++ cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/HSSFElementProcessorFactory.java Thu Oct 18 21:19:27 2007
@@ -103,17 +103,15 @@
  *
  * @version $Id$
  */
-public class HSSFElementProcessorFactory
-    extends AbstractElementProcessorFactory
-{
+public class HSSFElementProcessorFactory extends AbstractElementProcessorFactory {
+
     //holds the locale configuration
     String locale;
+
     /**
      * default constructor
      */
-
-    public HSSFElementProcessorFactory(String locale)
-    {
+    public HSSFElementProcessorFactory(String locale) {
         super();
         this.locale=locale;
         addElementProcessorProgenitor("Attribute", EPAttribute.class);
@@ -208,12 +206,10 @@
      *
      * @exception CannotCreateElementProcessorException
      */
+    protected ElementProcessor doCreateElementProcessor(final Object progenitor)
+    throws CannotCreateElementProcessorException {
 
-    protected ElementProcessor doCreateElementProcessor(
-            final Object progenitor)
-            throws CannotCreateElementProcessorException {
-        ElementProcessor rval = null;
-
+        ElementProcessor rval;
         try {
             rval = createNewElementProcessorInstance((Class)progenitor);
 
@@ -228,4 +224,4 @@
         }
         return rval;
     }
-}   // end public class HSSFElementProcessorFactory
+}

Modified: cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/serialization/HSSFSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/serialization/HSSFSerializer.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/serialization/HSSFSerializer.java (original)
+++ cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/serialization/HSSFSerializer.java Thu Oct 18 21:19:27 2007
@@ -33,7 +33,8 @@
  * 
  * @version $Id$
  */
-public class HSSFSerializer extends POIFSSerializer implements SitemapModelComponent {
+public class HSSFSerializer extends POIFSSerializer
+                            implements SitemapModelComponent {
 
     private ElementProcessorFactory _element_processor_factory;
     private String locale;
@@ -46,8 +47,8 @@
      * @exception ProcessingException
      *                if an error occurs
      */
-    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException,
-            SAXException, IOException {
+    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
+    throws ProcessingException, SAXException, IOException {
         try {
             if (par.isParameter("locale")) {
                 setLocale(par.getParameter("locale"));
@@ -56,7 +57,6 @@
             throw new ProcessingException(e);
         }
         _element_processor_factory = new HSSFElementProcessorFactory(locale);
-        setupLogger(_element_processor_factory);
     }
 
     /**

Modified: cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonLanguage.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonLanguage.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonLanguage.java (original)
+++ cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonLanguage.java Thu Oct 18 21:19:27 2007
@@ -16,23 +16,22 @@
  */
 package org.apache.cocoon.components.language.programming.python;
 
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.cocoon.components.language.programming.AbstractProgrammingLanguage;
-import org.apache.cocoon.components.language.programming.ProgrammingLanguage;
-import org.apache.cocoon.components.language.programming.Program;
-import org.apache.cocoon.components.language.LanguageException;
-import org.apache.cocoon.components.language.markup.xsp.XSLTExtension;
-import org.apache.cocoon.util.IOUtils;
-import org.apache.cocoon.util.ClassUtils;
-
-import java.io.File;
 import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.io.FileInputStream;
 import java.util.ArrayList;
 
+import org.apache.cocoon.components.language.LanguageException;
+import org.apache.cocoon.components.language.markup.xsp.XSLTExtension;
+import org.apache.cocoon.components.language.programming.AbstractProgrammingLanguage;
+import org.apache.cocoon.components.language.programming.Program;
+import org.apache.cocoon.components.language.programming.ProgrammingLanguage;
+import org.apache.cocoon.util.ClassUtils;
+import org.apache.cocoon.util.IOUtils;
+
 /**
  * The interpreted Python programming language.
  * Program in Python must have comment line as first line of file:
@@ -43,7 +42,8 @@
  *
  * @version $Id$
  */
-public class PythonLanguage extends AbstractProgrammingLanguage implements ProgrammingLanguage {
+public class PythonLanguage extends AbstractProgrammingLanguage
+                            implements ProgrammingLanguage {
 
     public Program preload(String filename, File baseDirectory, String encoding) throws LanguageException {
         return load(filename, baseDirectory, encoding);
@@ -101,9 +101,7 @@
             }
         }
 
-        final Program p = new PythonProgram(sourceFile, clazz, dependecies);
-        ContainerUtil.enableLogging(p, this.getLogger());
-        return p;
+        return new PythonProgram(sourceFile, clazz, dependecies);
     }
 
     private String getMeta(String line, String meta) {

Modified: cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonProgram.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonProgram.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonProgram.java (original)
+++ cocoon/trunk/blocks/cocoon-python/cocoon-python-impl/src/main/java/org/apache/cocoon/components/language/programming/python/PythonProgram.java Thu Oct 18 21:19:27 2007
@@ -16,33 +16,35 @@
  */
 package org.apache.cocoon.components.language.programming.python;
 
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
+import java.io.File;
+import java.util.Collection;
+import java.util.Iterator;
+
 import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceManager;
 
-import org.apache.cocoon.components.language.programming.Program;
 import org.apache.cocoon.components.language.generator.CompiledComponent;
+import org.apache.cocoon.components.language.programming.Program;
 import org.apache.cocoon.core.container.spring.avalon.ComponentInfo;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.xsp.handler.AbstractComponentHandler;
 import org.apache.cocoon.xsp.handler.ComponentHandler;
 
-import java.io.File;
-import java.util.Collection;
-import java.util.Iterator;
-
 /**
  * This class represents program in the Python language.
  *
  * @version $Id$
  */
-public class PythonProgram extends AbstractLogEnabled implements Program {
+public class PythonProgram extends AbstractLogEnabled
+                           implements Program {
 
     protected File file;
     protected Class clazz;
     protected DefaultConfiguration config;
 
+
     public PythonProgram(File file, Class clazz, Collection dependecies) {
         this.file = file;
         this.clazz = clazz;
@@ -65,18 +67,20 @@
         return file.toString();
     }
 
-    public ComponentHandler getHandler(ServiceManager manager,
-                                       Context context)
+    public ComponentHandler getHandler(ServiceManager manager, Context context)
     throws Exception {
-
-        return AbstractComponentHandler.getComponentHandler(
-                clazz, getLogger(), context, manager, config);
+        return AbstractComponentHandler.getComponentHandler(clazz,
+                                                            context,
+                                                            manager,
+                                                            config);
     }
 
     public CompiledComponent newInstance() throws Exception {
         CompiledComponent instance = (CompiledComponent) clazz.newInstance();
-        if (instance instanceof Configurable)
+        if (instance instanceof Configurable) {
             ((Configurable) instance).configure(config);
+        }
+
         return instance;
     }
 }

Modified: cocoon/trunk/blocks/cocoon-repository/cocoon-repository-impl/src/main/java/org/apache/cocoon/components/repository/RepositoryManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-repository/cocoon-repository-impl/src/main/java/org/apache/cocoon/components/repository/RepositoryManager.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-repository/cocoon-repository-impl/src/main/java/org/apache/cocoon/components/repository/RepositoryManager.java (original)
+++ cocoon/trunk/blocks/cocoon-repository/cocoon-repository-impl/src/main/java/org/apache/cocoon/components/repository/RepositoryManager.java Thu Oct 18 21:19:27 2007
@@ -32,7 +32,6 @@
 import org.apache.cocoon.components.LifecycleHelper;
 import org.apache.cocoon.components.repository.helpers.CredentialsToken;
 import org.apache.cocoon.util.AbstractLogEnabled;
-import org.apache.cocoon.util.avalon.CLLoggerWrapper;
 
 
 /**
@@ -110,11 +109,10 @@
 
             Repository repo = (Repository) repoClass.newInstance();
             LifecycleHelper.setupComponent(repo,
-                                           new CLLoggerWrapper(getLogger()),
+                                           getLogger(),
                                            null,
                                            this.manager,
-                                           repoConfiguration,
-                                           true);
+                                           repoConfiguration);
         
             repo.setCredentials(credentials);
             return repo;

Modified: cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/acting/LinkTranslatorMapAction.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/acting/LinkTranslatorMapAction.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/acting/LinkTranslatorMapAction.java (original)
+++ cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/acting/LinkTranslatorMapAction.java Thu Oct 18 21:19:27 2007
@@ -19,9 +19,9 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.commons.logging.Log;
 
 import org.apache.cocoon.Constants;
 import org.apache.cocoon.environment.ObjectModelHelper;
@@ -36,11 +36,10 @@
  * @since 16 December 2002
  * @version $Id$
  */
-public class LinkTranslatorMapAction
-    extends AbstractAction
-    implements ThreadSafe {
+public class LinkTranslatorMapAction extends AbstractAction
+                                     implements ThreadSafe {
 
-    final static protected String LINK_MAP_PREFIX = "linkMap:";
+    protected static final String LINK_MAP_PREFIX = "linkMap:";
 
     /**
      * Execute the LinkTranslatorMapAction.
@@ -99,7 +98,7 @@
                 "ext " + extension);
 
         if (extension != null) {
-            LinkPatternHashMap lphm = new LinkPatternHashMap(path, extension, linkObjectMap, this.getLogger());
+            LinkPatternHashMap lphm = new LinkPatternHashMap(path, extension, linkObjectMap, getLogger());
 
             objectModel.put(Constants.LINK_OBJECT, lphm);
         }
@@ -113,7 +112,7 @@
      */
     public static class LinkPatternHashMap extends HashMap {
 
-        protected final Logger logger;
+        protected final Log logger;
         protected final String pageExtension;
         protected final String path;
         protected final Map parent;
@@ -128,7 +127,7 @@
         public LinkPatternHashMap(String path,
                                   String pageExtension,
                                   Map    parentMap,
-                                  Logger logger) {
+                                  Log    logger) {
             this.pageExtension = pageExtension;
             this.path = path;
             this.parent = parentMap;
@@ -193,7 +192,7 @@
             }
 
             // now nearly finished
-            Object result = null;
+            Object result;
 
             if (newHref != null) {
                 // if href is non null, take it as result
@@ -209,6 +208,7 @@
             if (logger.isDebugEnabled()) {
                 logger.debug("For key " + key + " result is " + result);
             }
+
             return result;
         }
     }

Modified: cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_Cocoon.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_Cocoon.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_Cocoon.java (original)
+++ cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_Cocoon.java Thu Oct 18 21:19:27 2007
@@ -28,16 +28,20 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.flow.ContinuationsManager;
-import org.apache.cocoon.components.flow.WebContinuation;
 import org.apache.cocoon.components.flow.Interpreter.Argument;
+import org.apache.cocoon.components.flow.WebContinuation;
 import org.apache.cocoon.environment.Cookie;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Redirector;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.Response;
 import org.apache.cocoon.environment.Session;
+
 import org.mozilla.javascript.JavaScriptException;
 import org.mozilla.javascript.Script;
 import org.mozilla.javascript.Scriptable;
@@ -54,11 +58,12 @@
  */
 public class AO_FOM_Cocoon extends ScriptableObject {
 
+    private final Log logger = LogFactory.getLog(getClass());
+
     private AO_FOM_JavaScriptInterpreter interpreter;
 
     private Redirector redirector;
     private ServiceManager componentManager;
-    private Logger logger;
     private Context avalonContext;
 
     private FOM_Request request;
@@ -89,13 +94,11 @@
     void setup(AO_FOM_JavaScriptInterpreter interp,
                       Redirector redirector, 
                       Context avalonContext,
-                      ServiceManager manager,
-                      Logger logger) {
+                      ServiceManager manager) {
         this.interpreter = interp;
         this.redirector = redirector;
         this.avalonContext = avalonContext;
         this.componentManager = manager;
-        this.logger = logger;
     }
 
     void invalidate() {
@@ -104,7 +107,6 @@
         this.session = null;
         this.context = null;
         this.log = null;
-        this.logger = null;
         this.componentManager = null;
         this.redirector = null;
         this.interpreter = null;
@@ -890,7 +892,7 @@
      */
     public void handleContinuation(String kontId, Scriptable parameters) 
         throws Exception {
-        List list = null;
+        List list;
         if (parameters == null || parameters == Undefined.instance) {
             parameters = this.parameters;
         }

Modified: cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_JavaScriptInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_JavaScriptInterpreter.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_JavaScriptInterpreter.java (original)
+++ cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_JavaScriptInterpreter.java Thu Oct 18 21:19:27 2007
@@ -25,7 +25,6 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import javax.servlet.http.HttpSession;
 
 import org.apache.avalon.framework.CascadingRuntimeException;
@@ -36,6 +35,11 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
+import org.apache.commons.jxpath.JXPathIntrospector;
+import org.apache.commons.jxpath.ri.JXPathContextReferenceImpl;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceResolver;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.ResourceNotFoundException;
 import org.apache.cocoon.components.ContextHelper;
@@ -50,10 +54,7 @@
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Redirector;
 import org.apache.cocoon.environment.Request;
-import org.apache.commons.jxpath.JXPathIntrospector;
-import org.apache.commons.jxpath.ri.JXPathContextReferenceImpl;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
+
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.EcmaError;
 import org.mozilla.javascript.EvaluatorException;
@@ -87,8 +88,7 @@
  * @version $Id$
  */
 public class AO_FOM_JavaScriptInterpreter extends AbstractInterpreter
-    implements Serviceable, Configurable, Initializable
-{
+                                          implements Serviceable, Configurable, Initializable {
 
     private SourceResolver sourceResolver;
 
@@ -396,10 +396,10 @@
             context.newObject(thrScope, "AO_FOM_Cocoon", args);
         cocoon.setParentScope(thrScope);
         thrScope.put("cocoon", thrScope, cocoon);
-        ((ScriptableObject)thrScope).defineProperty(LAST_EXEC_TIME,
-                                                    new Long(0),
-                                                    ScriptableObject.DONTENUM |
-                                                    ScriptableObject.PERMANENT);
+        thrScope.defineProperty(LAST_EXEC_TIME,
+                                new Long(0),
+                                ScriptableObject.DONTENUM |
+                                ScriptableObject.PERMANENT);
         
         thrScope.reset();
         return thrScope;
@@ -438,8 +438,8 @@
                                                 thrScope)).longValue();
         // We need to setup the FOM_Cocoon object according to the current
         // request. Everything else remains the same.
-        cocoon.setup( this, redirector, avalonContext, manager, getLogger());
-        
+        cocoon.setup(this, redirector, avalonContext, manager);
+
         // Check if we need to compile and/or execute scripts
         synchronized (compiledScripts) {
             List execList = new ArrayList();
@@ -479,11 +479,10 @@
                 // add interception support
                 if( isInterceptionEnabled ) {
                     JavaScriptAspectWeaver aspectWeaver = new JavaScriptAspectWeaver();
-                    aspectWeaver.enableLogging( this.getLogger() );
                     aspectWeaver.service(this.manager);
-                    aspectWeaver.setSerializeResultScriptParam( this.serializeResultScript );
-                    aspectWeaver.setStopExecutionFunctionsConf( this.stopExecutionFunctionsConf );
-                    entry.setAspectWeaver( aspectWeaver );
+                    aspectWeaver.setSerializeResultScriptParam(this.serializeResultScript);
+                    aspectWeaver.setStopExecutionFunctionsConf(this.stopExecutionFunctionsConf);
+                    entry.setAspectWeaver(aspectWeaver);
                 }        
                 // --end           
                 // Compile the script if necessary
@@ -522,7 +521,7 @@
         synchronized (compiledScripts) {
             ScriptSourceEntry entry =
                 (ScriptSourceEntry)compiledScripts.get(src.getURI());
-            Script compiledScript = null;
+            Script compiledScript;
             if (entry == null) {
                 compiledScripts.put(src.getURI(),
                                     entry = new ScriptSourceEntry(src));
@@ -534,8 +533,8 @@
     // (RPO) added/changed by interception layer   
     protected Script compileScript( Context cx, Scriptable scope, 
                                   Source src, JavaScriptAspectWeaver aspectWeaver)
-        throws Exception {
-        Script compiledScript = null;
+    throws Exception {
+        Script compiledScript;
 
         boolean areScriptsApplied = false;
 
@@ -584,7 +583,7 @@
         context.setOptimizationLevel(OPTIMIZATION_LEVEL);
         context.setGeneratingDebug(true);
         context.setCompileFunctionsWithDynamicScope(true);
-        context.setErrorReporter(new JSErrorReporter(getLogger()));
+        context.setErrorReporter(new JSErrorReporter());
         AO_FOM_Cocoon cocoon = null;
         Scriptable thrScope = getSessionScope();
         synchronized (thrScope) {
@@ -613,8 +612,7 @@
                 if (fun == Scriptable.NOT_FOUND) {
                     throw new ResourceNotFoundException("Function \"javascript:"+funName+ "()\" not found");
                 }
-                ScriptRuntime.call(context, fun, thrScope, 
-                                   funArgs, thrScope);
+                ScriptRuntime.call(context, fun, thrScope, funArgs, thrScope);
             } catch (JavaScriptException ex) {
                 EvaluatorException ee =
                     Context.reportRuntimeError(ToolErrorReporter.getMessage("msg.uncaughtJSException",
@@ -672,7 +670,7 @@
         Scriptable kScope = k.getParentScope();
         synchronized (kScope) {
             AO_FOM_Cocoon cocoon = (AO_FOM_Cocoon)kScope.get("cocoon", kScope);
-            cocoon.setup(this, redirector, avalonContext, manager, getLogger());
+            cocoon.setup(this, redirector, avalonContext, manager);
             if (enableDebugger) {
                 getDebugger().setVisible(true);
             }

Modified: cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/JavaScriptAspectWeaver.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/JavaScriptAspectWeaver.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/JavaScriptAspectWeaver.java (original)
+++ cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/JavaScriptAspectWeaver.java Thu Oct 18 21:19:27 2007
@@ -33,14 +33,15 @@
 
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.util.WildcardMatcherHelper;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+import org.apache.cocoon.util.WildcardMatcherHelper;
+
 
 /**
  * <p>
@@ -85,28 +86,30 @@
  * @since Sept, 2003
  * @version $Id$
  */
-public class JavaScriptAspectWeaver extends AbstractLogEnabled implements Serviceable {
+public class JavaScriptAspectWeaver extends AbstractLogEnabled
+                                    implements Serviceable {
     
     /** All Interceptors in the right order */
     ArrayList interceptorGroups = new ArrayList();
     
     /** The service manager */
-    ServiceManager manager = null;
+    ServiceManager manager;
     
     /** If debugging is true, the intercepted script is writen to filesystem */
-    boolean serializeResultScript = false;
+    boolean serializeResultScript;
 
     /** Base script <code>org.apache.excalibur.source.Source</code>*/
-    Source source = null; 
+    Source source;
     
     /** The javascript repsented in <code>JSToken</code>*/
-    JSTokenList baseScriptTokenList = null; 
+    JSTokenList baseScriptTokenList;
     
     /** Does this base script contain applied scripts? */
-    boolean areScriptsApplied = false;
+    boolean areScriptsApplied;
     
     /** Provided configuration (part of the Interpreter configuration) **/
-    ArrayList stopExecutionFunctions = null;
+    ArrayList stopExecutionFunctions;
+
 
     /**
      * Set the base script (the script which is scanned for applied
@@ -514,6 +517,7 @@
                          
                 }  
             }
+
             return tokenList;
         }  
 
@@ -541,11 +545,10 @@
          * character.
          *  
          * TODO implement it according the ECMA spec
-         */    
-        private static boolean isJSIdentifierStartCharacter( char c ) {
-            if( Character.isJavaIdentifierStart( c ) ) return true;
-            return false;
-        }        
+         */
+        private static boolean isJSIdentifierStartCharacter(char c) {
+            return Character.isJavaIdentifierStart(c);
+        }
 
     }
 
@@ -755,8 +758,8 @@
                        
             ListIterator li = this.stopExecutionFunctions.listIterator();
             while( li.hasNext() ) {
-                String object = "";
-                String function = "";
+                String object;
+                String function;
                 StringTokenizer st = new StringTokenizer( (String) li.next(), ".");
                 int countTokens = st.countTokens();
 

Modified: cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/ws/WebServiceLoader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/ws/WebServiceLoader.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/ws/WebServiceLoader.java (original)
+++ cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/components/flow/ws/WebServiceLoader.java Thu Oct 18 21:19:27 2007
@@ -20,15 +20,12 @@
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.rmi.Remote;
-
 import javax.wsdl.WSDLException;
 
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.LogEnabled;
-import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
@@ -36,18 +33,19 @@
 import org.apache.axis.utils.JavaUtils;
 import org.apache.axis.wsdl.toJava.Namespaces;
 import org.apache.axis.wsdl.toJava.Utils;
-import org.apache.cocoon.Constants;
 import org.apache.excalibur.source.SourceResolver;
 import org.apache.excalibur.store.Store;
 
+import org.apache.cocoon.Constants;
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * Given a WSDL URL generates and compiles client bindings for the requested
  * service endpoint.
  */
-public class WebServiceLoader
-implements Contextualizable, ThreadSafe, Serviceable, Disposable, LogEnabled {
+public class WebServiceLoader extends AbstractLogEnabled
+                              implements Contextualizable, ThreadSafe, Serviceable, Disposable {
 
-    protected Logger logger;
     protected ServiceManager serviceManager;
     // protected CompilingClassLoader classLoader;
     // protected MyClassRepository javaClassRepository = new MyClassRepository();
@@ -57,13 +55,6 @@
 
 
     /**
-     * @see org.apache.avalon.framework.logger.LogEnabled#enableLogging(org.apache.avalon.framework.logger.Logger)
-     */
-    public void enableLogging(Logger logger) {
-        this.logger = logger;
-    }
-
-    /**
      * Loads a SOAP endpoint using the first service definition with a SOAP binding found in the referenced WSDL
      * document.
      *
@@ -127,7 +118,7 @@
                 this.endpointCache.store(key, endpoint);
             } catch (IOException e) {
                 String msg = "Error storing proxy in endpoint cache";
-                this.logger.error(msg);
+                getLogger().error(msg);
             }
         }
         return endpoint;
@@ -173,7 +164,7 @@
             return endpoint;
         } catch (Exception e) {
             String msg = "Error loading web service: " + serviceName;
-            this.logger.error(msg, e);
+            getLogger().error(msg, e);
             throw new LoadException(msg, e);
         }
     }
@@ -229,8 +220,7 @@
             String fileName = Utils.capitalizeFirstChar(serviceName) + ".java";
             return Utils.fileExists(fileName, namespace, namespaces);
         } catch (IOException e) {
-            logger.error("Error checking for binding class for service: "
-                    + serviceName);
+            getLogger().error("Error checking for binding class for service: " + serviceName);
         }
         return false;
     }
@@ -253,8 +243,7 @@
             this.endpointCache = (Store) this.serviceManager
                     .lookup(Store.TRANSIENT_STORE);
         } catch (ServiceException e) {
-            this.logger.error("Could not find component for role "
-                    + Store.TRANSIENT_STORE, e);
+            getLogger().error("Could not find component for role " + Store.TRANSIENT_STORE, e);
         }
     }
 

Modified: cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/selection/DateSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/selection/DateSelector.java?rev=586258&r1=586257&r2=586258&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/selection/DateSelector.java (original)
+++ cocoon/trunk/blocks/cocoon-scratchpad/cocoon-scratchpad-impl/src/main/java/org/apache/cocoon/selection/DateSelector.java Thu Oct 18 21:19:27 2007
@@ -28,9 +28,9 @@
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.commons.logging.Log;
 
 import org.apache.cocoon.environment.ObjectModelHelper;
 
@@ -106,9 +106,9 @@
  * @version $Id$
  */
 public class DateSelector extends AbstractSwitchSelector
-implements Configurable, ThreadSafe {
-    /** the configuration
-     */
+                          implements Configurable, ThreadSafe {
+
+    /** the configuration */
     private Configuration config;
     
     final public static String AFTER_ELEMENT = "after";
@@ -140,9 +140,9 @@
                 dateformat = confs[i].getAttribute( DATEFORMAT_ATTR, null );
                 language = confs[i].getAttribute( LANGUAGE_ATTR, null );
                 country = confs[i].getAttribute( COUNTRY_ATTR, null);
-                Date parsed_date = null;
+                Date parsed_date;
                 
-                SimpleDateFormat sdf = null;
+                SimpleDateFormat sdf;
                 if (dateformat != null && language != null && country != null) {
                     Locale locale = new Locale( language, country );
                     sdf = new SimpleDateFormat( dateformat, locale );
@@ -230,7 +230,7 @@
         configure( config, AFTER_ELEMENT, map );
         
         // 2 create SelectorContext
-        DateSelectorContext csc = new DateSelectorContext(this.getLogger());
+        DateSelectorContext csc = new DateSelectorContext(getLogger());
         // 3 precalculate result of comparing current date, and configuration map        
         csc.setup( map );
         
@@ -336,9 +336,9 @@
     private static class DateSelectorContext {
         Date now;
         HashSet set;
-        Logger logger;
+        Log logger;
         
-        public DateSelectorContext(Logger logger) {
+        public DateSelectorContext(Log logger) {
             now = new Date();
             set = new HashSet();
             this.logger = logger;



Mime
View raw message