cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r585361 - in /cocoon/trunk/blocks: cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/modules/database/ cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/ cocoon-del...
Date Wed, 17 Oct 2007 04:29:29 GMT
Author: vgritsenko
Date: Tue Oct 16 21:29:26 2007
New Revision: 585361

URL: http://svn.apache.org/viewvc?rev=585361&view=rev
Log:
switching AbstractLogEnabled on components

Modified:
    cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/modules/database/AbstractAutoIncrementModule.java
    cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSource.java
    cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSourceFactory.java
    cocoon/trunk/blocks/cocoon-deli/cocoon-deli-impl/src/main/java/org/apache/cocoon/components/deli/DeliImpl.java
    cocoon/trunk/blocks/cocoon-eventcache/cocoon-eventcache-impl/src/main/java/org/apache/cocoon/caching/impl/AbstractDoubleMapEventRegistry.java
    cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessageListener.java
    cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessagePublisher.java
    cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionImpl.java
    cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionManagerImpl.java
    cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java
    cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplNamedDispatcherInclude.java
    cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplWLS.java
    cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
    cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java
    cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSource.java
    cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSourceFactory.java

Modified: cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/modules/database/AbstractAutoIncrementModule.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/modules/database/AbstractAutoIncrementModule.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/modules/database/AbstractAutoIncrementModule.java (original)
+++ cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/modules/database/AbstractAutoIncrementModule.java Tue Oct 16 21:29:26 2007
@@ -21,8 +21,8 @@
 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.AbstractLogEnabled;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.util.HashMap;
 
 /**
@@ -33,13 +33,13 @@
  * @version $Id$
  */
 public abstract class AbstractAutoIncrementModule extends AbstractLogEnabled
-    implements AutoIncrementModule, Configurable, Disposable {
+                                                  implements AutoIncrementModule, Configurable, Disposable {
 
     /**
      * Stores (global) configuration parameters as <code>key</code> /
      * <code>value</code> pairs.
      */
-    protected HashMap settings = null;
+    protected HashMap settings;
 
     /**
      * Configures the database access module.

Modified: cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSource.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSource.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSource.java (original)
+++ cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSource.java Tue Oct 16 21:29:26 2007
@@ -31,7 +31,6 @@
 import java.util.Iterator;
 
 import org.apache.avalon.excalibur.datasource.DataSourceComponent;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.avalon.framework.service.Serviceable;
@@ -41,6 +40,7 @@
 import org.apache.excalibur.source.SourceValidity;
 
 import org.apache.cocoon.CascadingIOException;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * A <code>Source</code> that takes its content in a single JDBC column. Any
@@ -151,7 +151,7 @@
     /**
      * Get the input stream for this source.
      */
-    public InputStream getInputStream() throws IOException, SourceException {
+    public InputStream getInputStream() throws IOException {
         if (getLogger().isDebugEnabled()) {
             getLogger().debug("Opening stream for datasource " + this.datasourceName +
                 ", table " + this.tableName + ", column " + this.columnName +

Modified: cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSourceFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSourceFactory.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSourceFactory.java (original)
+++ cocoon/trunk/blocks/cocoon-databases/cocoon-databases-impl/src/main/java/org/apache/cocoon/components/source/impl/BlobSourceFactory.java Tue Oct 16 21:29:26 2007
@@ -16,28 +16,25 @@
  */
 package org.apache.cocoon.components.source.impl;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import java.io.IOException;
+import java.util.Map;
+
 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.excalibur.source.Source;
-import org.apache.excalibur.source.SourceException;
 import org.apache.excalibur.source.SourceFactory;
 
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Map;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * A factory for 'blob:' sources.
  *
  * @version $Id$
  */
-public class BlobSourceFactory
-  extends AbstractLogEnabled
-  implements Serviceable, SourceFactory, ThreadSafe {
+public class BlobSourceFactory extends AbstractLogEnabled
+                               implements Serviceable, SourceFactory, ThreadSafe {
     
     /** The ServiceManager instance */
     protected ServiceManager manager;
@@ -46,10 +43,8 @@
      * Get a <code>Source</code> object.
      * @param parameters This is optional.
      */
-    public Source getSource(String location, Map parameters)
-        throws MalformedURLException, IOException, SourceException {
+    public Source getSource(String location, Map parameters) throws IOException {
         BlobSource blob = new BlobSource(location);
-        this.setupLogger(blob);
         blob.service(this.manager);
         return blob;
     }
@@ -67,6 +62,4 @@
 	public void service(ServiceManager manager) throws ServiceException {
         this.manager = manager;
 	}
-
 }
-    

Modified: cocoon/trunk/blocks/cocoon-deli/cocoon-deli-impl/src/main/java/org/apache/cocoon/components/deli/DeliImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-deli/cocoon-deli-impl/src/main/java/org/apache/cocoon/components/deli/DeliImpl.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-deli/cocoon-deli-impl/src/main/java/org/apache/cocoon/components/deli/DeliImpl.java (original)
+++ cocoon/trunk/blocks/cocoon-deli/cocoon-deli-impl/src/main/java/org/apache/cocoon/components/deli/DeliImpl.java Tue Oct 16 21:29:26 2007
@@ -26,7 +26,6 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.Vector;
-
 import javax.servlet.RequestDispatcher;
 import javax.servlet.Servlet;
 import javax.servlet.ServletContext;
@@ -41,23 +40,24 @@
 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.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameterizable;
 import org.apache.avalon.framework.parameters.Parameters;
 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.excalibur.xml.dom.DOMParser;
+
 import org.apache.cocoon.Constants;
 import org.apache.cocoon.environment.Request;
-import org.apache.excalibur.xml.dom.DOMParser;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Text;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 import com.hp.hpl.deli.Profile;
 import com.hp.hpl.deli.ProfileAttribute;
 import com.hp.hpl.deli.Workspace;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
 
 /**
  * Allows the use of <a href="http://www-uk.hpl.hp.com/people/marbut/">DELI</a>
@@ -70,8 +70,8 @@
  * @version $Id$
  */
 public final class DeliImpl extends AbstractLogEnabled
-    implements Parameterizable, Deli, Serviceable, Disposable, Initializable,
-               ThreadSafe, Contextualizable {
+                            implements Parameterizable, Deli, Serviceable, Disposable,
+                                       Initializable, ThreadSafe, Contextualizable {
 
     /** The name of the main DELI configuration file */
     private String deliConfig = "deli/config/deliConfig.xml";
@@ -141,17 +141,14 @@
      * @throws	ServletException
      * @throws	Exception
      */
-    public Profile getProfile(Request theRequest)
-        throws IOException, ServletException, Exception {
-        Profile theProfile = null;
+    public Profile getProfile(Request theRequest) throws IOException, ServletException, Exception {
         try {
             CocoonServletRequest servletRequest = new CocoonServletRequest(theRequest);
-            theProfile = new Profile(servletRequest);
+            return new Profile(servletRequest);
         } catch (Exception e) {
             getLogger().error("DELI Exception while retrieving profile: ", e);
             throw e;
         }
-        return theProfile;
     }
 
     /** Convert a profile stored as a vector of profile attributes
@@ -161,7 +158,7 @@
      * @return	The DOM tree.
      */
     public Document getUACapabilities(Profile theProfile) throws Exception {
-        Document document = null;
+        Document document;
         try {
             Element rootElement;
             Element attributeNode;
@@ -172,32 +169,31 @@
             rootElement = document.createElementNS(null, "browser");
             document.appendChild(rootElement);
 
-            Iterator profileIter = theProfile.iterator();
-            while (profileIter.hasNext()) {
-                ProfileAttribute p = (ProfileAttribute)profileIter.next();
+            Iterator i = theProfile.iterator();
+            while (i.hasNext()) {
+                ProfileAttribute p = (ProfileAttribute) i.next();
                 attributeNode = document.createElementNS(null, p.getAttribute());
                 rootElement.appendChild(attributeNode);
                 Vector attributeValue = p.get();
-		if (attributeValue != null)
-		{
-			Iterator complexValueIter = attributeValue.iterator();
-			if (p.getCollectionType().equals("Simple")) {
-				// Simple attribute
-				String value = (String)complexValueIter.next();
-				text = document.createTextNode(value);
-				attributeNode.appendChild(text);
-			} else {
-				// Complex attribute e.g. Seq or Bag
-				while (complexValueIter.hasNext()) {
-					String value = (String)complexValueIter.next();
-					complexAttributeNode = document.createElementNS(null, "li");
-					attributeNode.appendChild(complexAttributeNode);
-					text = document.createTextNode(value);
-					complexAttributeNode.appendChild(text);
-				}
-			}
+                if (attributeValue != null) {
+                    Iterator complexValueIter = attributeValue.iterator();
+                    if (p.getCollectionType().equals("Simple")) {
+                        // Simple attribute
+                        String value = (String)complexValueIter.next();
+                        text = document.createTextNode(value);
+                        attributeNode.appendChild(text);
+                    } else {
+                        // Complex attribute e.g. Seq or Bag
+                        while (complexValueIter.hasNext()) {
+                            String value = (String)complexValueIter.next();
+                            complexAttributeNode = document.createElementNS(null, "li");
+                            attributeNode.appendChild(complexAttributeNode);
+                            text = document.createTextNode(value);
+                            complexAttributeNode.appendChild(text);
+                        }
                     }
                 }
+            }
         } catch (Exception e) {
             getLogger().error("DELI Exception while converting profile to DOM fragment: ", e);
             throw e;
@@ -206,7 +202,7 @@
     }
 
     public Document getUACapabilities(Request theRequest)
-        throws IOException, Exception {
+    throws IOException, Exception {
         return this.getUACapabilities(this.getProfile(theRequest));
     }
 

Modified: cocoon/trunk/blocks/cocoon-eventcache/cocoon-eventcache-impl/src/main/java/org/apache/cocoon/caching/impl/AbstractDoubleMapEventRegistry.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-eventcache/cocoon-eventcache-impl/src/main/java/org/apache/cocoon/caching/impl/AbstractDoubleMapEventRegistry.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-eventcache/cocoon-eventcache-impl/src/main/java/org/apache/cocoon/caching/impl/AbstractDoubleMapEventRegistry.java (original)
+++ cocoon/trunk/blocks/cocoon-eventcache/cocoon-eventcache-impl/src/main/java/org/apache/cocoon/caching/impl/AbstractDoubleMapEventRegistry.java Tue Oct 16 21:29:26 2007
@@ -23,11 +23,12 @@
 
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.commons.collections.MultiHashMap;
+
 import org.apache.cocoon.caching.EventRegistry;
 import org.apache.cocoon.caching.validity.Event;
-import org.apache.commons.collections.MultiHashMap;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * This abstract base implementation of <code>EventRegistry</code> stores 
@@ -43,11 +44,11 @@
  * @since 2.1
  * @version $Id$
  */
-public abstract class AbstractDoubleMapEventRegistry
-    extends AbstractLogEnabled
-    implements Initializable, EventRegistry, Disposable, ThreadSafe {
+public abstract class AbstractDoubleMapEventRegistry extends AbstractLogEnabled
+                                                     implements Initializable, EventRegistry,
+                                                                Disposable, ThreadSafe {
 
-    private boolean m_init_success = false;
+    private boolean m_init_success;
     private MultiHashMap m_keyMMap;
     private MultiHashMap m_eventMMap;
     

Modified: cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessageListener.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessageListener.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessageListener.java (original)
+++ cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessageListener.java Tue Oct 16 21:29:26 2007
@@ -23,9 +23,9 @@
 import javax.jms.TopicConnection;
 import javax.jms.TopicSession;
 import javax.jms.TopicSubscriber;
+
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameterizable;
 import org.apache.avalon.framework.parameters.Parameters;
@@ -33,6 +33,8 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * Abstract {@link javax.jms.MessageListener} implementation. 
  * Use this as a basis for concrete MessageListener implementations. 
@@ -77,8 +79,8 @@
  * @version $Id$
  */
 public abstract class AbstractMessageListener extends AbstractLogEnabled
-implements MessageListener, Serviceable, Parameterizable, Initializable, Disposable,
-           JMSConnectionEventListener {
+                                              implements MessageListener, Serviceable, Parameterizable,
+                                                         Initializable, Disposable, JMSConnectionEventListener {
 
     // ---------------------------------------------------- Constants
 

Modified: cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessagePublisher.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessagePublisher.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessagePublisher.java (original)
+++ cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/AbstractMessagePublisher.java Tue Oct 16 21:29:26 2007
@@ -27,7 +27,6 @@
 
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameterizable;
 import org.apache.avalon.framework.parameters.Parameters;
@@ -35,6 +34,8 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * Abstract JMS message publisher. Use this as a basis for components 
  * that want to publish JMS messages.
@@ -90,7 +91,8 @@
  * @version $Id$
  */
 public abstract class AbstractMessagePublisher extends AbstractLogEnabled
-implements Serviceable, Parameterizable, Initializable, Disposable, JMSConnectionEventListener {
+                                               implements Serviceable, Parameterizable, Initializable,
+                                                          Disposable, JMSConnectionEventListener {
 
     // ---------------------------------------------------- Constants
 

Modified: cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionImpl.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionImpl.java (original)
+++ cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionImpl.java Tue Oct 16 21:29:26 2007
@@ -20,7 +20,6 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
-
 import javax.jms.JMSException;
 import javax.jms.MessageListener;
 import javax.jms.Session;
@@ -40,10 +39,11 @@
 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.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * JMSConnection properties container plus utilities.
  * 
@@ -65,25 +65,22 @@
  * @version $Id$
  * @deprecated  use {@link org.apache.cocoon.components.jms.JMSConnectionManager} instead
  */
-public class JMSConnectionImpl extends AbstractLogEnabled 
-                               implements Configurable, 
-                                          Disposable, 
-                                          ThreadSafe,
-                                          Initializable,  
-                                          JMSConnection {
+public class JMSConnectionImpl extends AbstractLogEnabled
+                               implements Configurable, Disposable, ThreadSafe,
+                                          Initializable, JMSConnection {
 
-    private boolean available = false;
+    private boolean available;
     protected String topicFactoryName;
     protected String topicName;
     protected String ackModeName = "dups";
     protected String durableSubscriptionID;
 
-    protected TopicConnection connection = null;
-    protected TopicSession session = null;
-    protected List subscribers = null;
-    protected Topic topic = null;
+    protected TopicConnection connection;
+    protected TopicSession session;
+    protected List subscribers;
+    protected Topic topic;
     protected int ackMode = Session.DUPS_OK_ACKNOWLEDGE;
-    protected Context context = null;
+    protected Context context;
     protected TopicConnectionFactory topicConnectionFactory;
 
     private Parameters jndiParams;
@@ -158,7 +155,7 @@
      */
     public void dispose() {
         try {
-            this.disconnect();
+            disconnect();
         } catch (JMSException e) {
         } catch (NamingException e) {
         }
@@ -180,7 +177,7 @@
             throw new CascadingException("Attempt to register Listener on unavailable JMS Connection");
         }
         
-        TopicSubscriber subscriber = null;
+        TopicSubscriber subscriber;
         if (this.durableSubscriptionID != null) {
             subscriber =
                 this.getSession().createDurableSubscriber(
@@ -239,7 +236,7 @@
         InitialContext ctx;
         if (jndiKeys.length > 0) {
             // Params specified in cocoon.xconf
-            Hashtable properties = null;
+            Hashtable properties;
             properties = new Hashtable();
             for (int i = 0 ; i < jndiKeys.length ; i++) {
                 properties.put(jndiKeys[i],jndiParams.getParameter(jndiKeys[i],""));

Modified: cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionManagerImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionManagerImpl.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionManagerImpl.java (original)
+++ cocoon/trunk/blocks/cocoon-jms/cocoon-jms-impl/src/main/java/org/apache/cocoon/components/jms/JMSConnectionManagerImpl.java Tue Oct 16 21:29:26 2007
@@ -33,6 +33,7 @@
 import javax.jms.TopicConnectionFactory;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+
 import org.apache.avalon.framework.CascadingException;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
@@ -40,23 +41,24 @@
 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.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameters;
 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.components.cron.CronJob;
 import org.apache.cocoon.components.cron.JobScheduler;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * {@link org.apache.cocoon.components.jms.JMSConnectionManager} implementation.
  */
-public class JMSConnectionManagerImpl extends AbstractLogEnabled 
-implements JMSConnectionManager, Serviceable, Configurable, Initializable,
-           Startable, Disposable, ThreadSafe, JMSConnectionEventNotifier {
+public class JMSConnectionManagerImpl extends AbstractLogEnabled
+                                      implements JMSConnectionManager, Serviceable, Configurable,
+                                                 Initializable, Startable, Disposable, ThreadSafe,
+                                                 JMSConnectionEventNotifier {
 
     // ---------------------------------------------------- Constants
     
@@ -453,7 +455,8 @@
 
     }
 
-    static final class ReconnectionJob implements CronJob {
+    static final class ReconnectionJob extends AbstractLogEnabled
+                                       implements CronJob {
 
         private final JMSConnectionManagerImpl m_manager;        
         private final ConnectionConfiguration m_configuration;
@@ -465,26 +468,25 @@
         }
         
         public void execute(String jobname) {
-            final Logger logger = m_manager.getLogger();
-            if (logger.isInfoEnabled()) {
-                logger.info("Reconnecting JMS connection: " + m_configuration.getName());
+            if (getLogger().isInfoEnabled()) {
+                getLogger().info("Reconnecting JMS connection: " + m_configuration.getName());
             }
             try {
                 final Connection connection = m_manager.createConnection(m_configuration);
                 m_manager.addConnection(m_configuration.getName(), connection);
-                if (logger.isInfoEnabled()) {
-                    logger.info("Successfully reconnected JMS connection: " + m_configuration.getName());
+                if (getLogger().isInfoEnabled()) {
+                    getLogger().info("Successfully reconnected JMS connection: " + m_configuration.getName());
                 }
             }
             catch (NamingException e) {
-                if (logger.isWarnEnabled()) {
-                    logger.warn("Failed to reconnect.",e);
+                if (getLogger().isWarnEnabled()) {
+                    getLogger().warn("Failed to reconnect.",e);
                 }
                 m_manager.scheduleReconnectionJob(m_configuration);
             }
             catch (JMSException e) {
-                if (logger.isWarnEnabled()) {
-                    logger.warn("Failed to reconnect.",e);
+                if (getLogger().isWarnEnabled()) {
+                    getLogger().warn("Failed to reconnect.",e);
                 }
                 m_manager.scheduleReconnectionJob(m_configuration);
             }

Modified: cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java (original)
+++ cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImpl.java Tue Oct 16 21:29:26 2007
@@ -17,25 +17,25 @@
 package org.apache.cocoon.components.jsp;
 
 import java.io.IOException;
-
 import javax.servlet.Servlet;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameterizable;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * Allows Servlets and JSPs to be used as a generator.
  *
  * @version $Id$
  */
 public class JSPEngineImpl extends AbstractLogEnabled
-    implements JSPEngine, Parameterizable, ThreadSafe {
+                           implements JSPEngine, Parameterizable, ThreadSafe {
 
     /** The Default Servlet Class Name for Tomcat 3.X and 4.X */
     public static final String DEFAULT_SERVLET_CLASS = "org.apache.jasper.servlet.JspServlet";
@@ -57,7 +57,7 @@
                              HttpServletRequest servletRequest, 
                              HttpServletResponse servletResponse,
                              ServletContext context)
-        throws IOException, ServletException, Exception {
+    throws IOException, ServletException, Exception {
         
         JSPEngineServletOutputStream output = new JSPEngineServletOutputStream();
         JSPEngineServletRequest request = new JSPEngineServletRequest(servletRequest, url);

Modified: cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplNamedDispatcherInclude.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplNamedDispatcherInclude.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplNamedDispatcherInclude.java (original)
+++ cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplNamedDispatcherInclude.java Tue Oct 16 21:29:26 2007
@@ -17,18 +17,18 @@
 package org.apache.cocoon.components.jsp;
 
 import java.io.IOException;
-
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameterizable;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * Allows a Servlet or JSP to be used as a generator.
  * 
@@ -40,7 +40,7 @@
  * @version $Id$
  */
 public class JSPEngineImplNamedDispatcherInclude extends AbstractLogEnabled
-    implements JSPEngine, Parameterizable, ThreadSafe {
+                                                 implements JSPEngine, Parameterizable, ThreadSafe {
 
     /**
      * 'servlet-name' configuration parameter name for specifying 
@@ -102,13 +102,13 @@
                              HttpServletRequest servletRequest,
                              HttpServletResponse servletResponse,
                              ServletContext servletContext)
-        throws IOException, ServletException, Exception {
+    throws IOException, ServletException, Exception {
         
         JSPEngineServletOutputStream output = new JSPEngineServletOutputStream();
         JSPEngineServletRequest request = new JSPEngineServletRequest(servletRequest,url);
         JSPEngineServletResponse response = new JSPEngineServletResponse(servletResponse,output);
         
-        byte[] bytes = null;
+        byte[] bytes;
         
         // dispatch to the named servlet
         RequestDispatcher rd = servletContext.getNamedDispatcher(servletName);

Modified: cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplWLS.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplWLS.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplWLS.java (original)
+++ cocoon/trunk/blocks/cocoon-jsp/cocoon-jsp-impl/src/main/java/org/apache/cocoon/components/jsp/JSPEngineImplWLS.java Tue Oct 16 21:29:26 2007
@@ -16,21 +16,22 @@
  */
 package org.apache.cocoon.components.jsp;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.parameters.Parameterizable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Locale;
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.Locale;
+
+import org.apache.avalon.framework.parameters.ParameterException;
+import org.apache.avalon.framework.parameters.Parameterizable;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.thread.ThreadSafe;
+
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * Allows WLS JSP to be used as a generator. 
@@ -42,7 +43,7 @@
  * @version $Id$
  */
 public class JSPEngineImplWLS extends AbstractLogEnabled
-    implements JSPEngine, Parameterizable, ThreadSafe {
+                              implements JSPEngine, Parameterizable, ThreadSafe {
 
     /** The Servlet Include Path */
     public static final String INC_SERVLET_PATH = "javax.servlet.include.servlet_path";
@@ -212,8 +213,7 @@
       }
 
       public String getResponseContentAsString() {
-        String s = new String( getResponseContentAsByteArray() );
-        return s;
+          return new String(getResponseContentAsByteArray());
       }
 
       // following methods forwarding from jsp-repsonse to cocoon2-repsonse

Modified: cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSource.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSource.java (original)
+++ cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSource.java Tue Oct 16 21:29:26 2007
@@ -27,18 +27,12 @@
 import java.util.Enumeration;
 import java.util.Properties;
 import java.util.Vector;
-
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.cocoon.components.source.InspectableSource;
-import org.apache.cocoon.components.source.helpers.SourceProperty;
-import org.apache.cocoon.xml.XMLUtils;
 import org.apache.commons.httpclient.HttpException;
 import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.HttpURL;
@@ -60,6 +54,12 @@
 import org.apache.webdav.lib.ResponseEntity;
 import org.apache.webdav.lib.WebdavResource;
 import org.apache.webdav.lib.methods.DepthSupport;
+
+import org.apache.cocoon.components.source.InspectableSource;
+import org.apache.cocoon.components.source.helpers.SourceProperty;
+import org.apache.cocoon.util.AbstractLogEnabled;
+import org.apache.cocoon.xml.XMLUtils;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
@@ -192,7 +192,7 @@
      * @throws SourceException
      * @throws SourceNotFoundException
      */
-    private void initResource(int action, int depth) throws SourceException, SourceNotFoundException {
+    private void initResource(int action, int depth) throws SourceException {
         try {
             boolean update = false;
             if (action != WebdavResource.NOACTION) {
@@ -238,12 +238,9 @@
      * Static factory method to obtain a Source.
      */
     public static WebDAVSource newWebDAVSource(HttpURL url,
-                                               String protocol,
-                                               Logger logger)
+                                               String protocol)
     throws URIException {
-        final WebDAVSource source = new WebDAVSource(url, protocol);
-        source.enableLogging(logger);
-        return source;
+        return new WebDAVSource(url, protocol);
     }
 
     /**
@@ -251,12 +248,9 @@
      */
     private static WebDAVSource newWebDAVSource(WebdavResource resource,
                                                 HttpURL url,
-                                                String protocol,
-                                                Logger logger)
+                                                String protocol)
     throws URIException {
-        final WebDAVSource source = new WebDAVSource(resource, url, protocol);
-        source.enableLogging(logger);
-        return source;
+        return new WebDAVSource(resource, url, protocol);
     }
 
     // ---------------------------------------------------- Source implementation
@@ -333,7 +327,7 @@
      * so if this is Modifiable, you might get different content
      * from two different invocations.
      */
-    public InputStream getInputStream() throws IOException, SourceException {
+    public InputStream getInputStream() throws IOException {
         initResource(WebdavResource.BASIC, DepthSupport.DEPTH_0);
         try {
             if (this.resource.isCollection()) {
@@ -342,7 +336,7 @@
                 WebdavResource[] resources = this.resource.listWebdavResources();
                 return resourcesToXml(resources);
             } else {
-                BufferedInputStream bi = null;
+                BufferedInputStream bi;
                 bi = new BufferedInputStream(this.resource.getMethodData());
                 if (!this.resource.exists()) {
                     throw new HttpException(getSecureURI() + " does not exist");
@@ -435,10 +429,9 @@
         return new ByteArrayInputStream(bOut.toByteArray());
     }
 
-    private void resourcesToSax(
-        WebdavResource[] resources,
-        ContentHandler handler)
-        throws SAXException {
+    private void resourcesToSax(WebdavResource[] resources,
+                                ContentHandler handler)
+    throws SAXException {
         for (int i = 0; i < resources.length; i++) {
             if (getLogger().isDebugEnabled()) {
                 final String message =
@@ -535,7 +528,7 @@
             } else {
                 childURL = new HttpURL(this.url, childName);
             }
-            return WebDAVSource.newWebDAVSource(childURL, this.protocol, getLogger());
+            return WebDAVSource.newWebDAVSource(childURL, this.protocol);
         } catch (URIException e) {
             throw new SourceException("Failed to create child", e);
         }
@@ -560,9 +553,7 @@
                 }
                 WebDAVSource src = WebDAVSource.newWebDAVSource(resources[i],
                                                                 childURL,
-                                                                this.protocol,
-                                                                getLogger());
-                src.enableLogging(getLogger());
+                                                                this.protocol);
                 children.add(src);
             }
         } catch (HttpException e) {
@@ -616,7 +607,7 @@
             } else {
                 parentURL = new HttpURL(this.url, path);
             }
-            return WebDAVSource.newWebDAVSource(parentURL, this.protocol, getLogger());
+            return WebDAVSource.newWebDAVSource(parentURL, this.protocol);
         } catch (URIException e) {
             throw new SourceException("Failed to create parent", e);
         }
@@ -797,8 +788,8 @@
          initResource(WebdavResource.NOACTION, DepthSupport.DEPTH_0);
 
          Vector sourceproperties = new Vector();
-         Enumeration props= null;
-         org.apache.webdav.lib.Property prop = null;
+         Enumeration props;
+         org.apache.webdav.lib.Property prop;
 
          try {
              Enumeration responses = this.resource.propfindMethod(0);
@@ -839,8 +830,8 @@
 
         Vector propNames = new Vector(1);
         propNames.add(new PropertyName(namespace,name));
-        Enumeration props= null;
-        org.apache.webdav.lib.Property prop = null;
+        Enumeration props;
+        org.apache.webdav.lib.Property prop;
         try {
             Enumeration responses = this.resource.propfindMethod(0, propNames);
             while (responses.hasMoreElements()) {

Modified: cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java (original)
+++ cocoon/trunk/blocks/cocoon-webdav/cocoon-webdav-impl/src/main/java/org/apache/cocoon/components/source/impl/WebDAVSourceFactory.java Tue Oct 16 21:29:26 2007
@@ -17,28 +17,27 @@
 package org.apache.cocoon.components.source.impl;
 
 import java.io.IOException;
-import java.net.MalformedURLException;
 import java.util.Map;
 
 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.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.commons.httpclient.HttpURL;
 import org.apache.commons.httpclient.HttpsURL;
 import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceException;
 import org.apache.excalibur.source.SourceFactory;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * A factory for WebDAV sources
  *
  * @version $Id$
 */
-public class WebDAVSourceFactory extends AbstractLogEnabled 
-implements SourceFactory, Configurable, ThreadSafe {
+public class WebDAVSourceFactory extends AbstractLogEnabled
+                                 implements SourceFactory, Configurable, ThreadSafe {
 
     private String protocol;
     private boolean secure;
@@ -58,8 +57,7 @@
      * Get a <code>Source</code> object.
      * @param parameters This is optional.
      */
-    public Source getSource(String location, Map parameters)
-        throws MalformedURLException, IOException, SourceException {
+    public Source getSource(String location, Map parameters) throws IOException {
         
         if (this.getLogger().isDebugEnabled()) {
             this.getLogger().debug("Creating source object for " + location);
@@ -77,7 +75,7 @@
             url = new HttpURL("http://" + location);
         }
         
-        return WebDAVSource.newWebDAVSource(url, this.protocol, getLogger());
+        return WebDAVSource.newWebDAVSource(url, this.protocol);
     }
 
     public void release(Source source) {

Modified: cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSource.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSource.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSource.java (original)
+++ cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSource.java Tue Oct 16 21:29:26 2007
@@ -23,16 +23,11 @@
 import java.io.OutputStream;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
-
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.cocoon.CascadingIOException;
-import org.apache.cocoon.xml.IncludeXMLConsumer;
 import org.apache.excalibur.source.ModifiableTraversableSource;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceException;
@@ -40,6 +35,11 @@
 import org.apache.excalibur.source.SourceUtil;
 import org.apache.excalibur.source.SourceValidity;
 import org.apache.excalibur.xml.sax.XMLizable;
+
+import org.apache.cocoon.CascadingIOException;
+import org.apache.cocoon.util.AbstractLogEnabled;
+import org.apache.cocoon.xml.IncludeXMLConsumer;
+
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
@@ -151,16 +151,11 @@
     /**
      * The constructor.
      *
-     * @param logger the Logger instance.
-     * @param user username 
+     * @param user username
      * @param password password
      * @param srcUrl the URL being queried.
      */
-    public XMLDBSource(Logger logger,
-                       String user, String password,
-                       String srcUrl) {
-        enableLogging(logger);
-
+    public XMLDBSource(String user, String password, String srcUrl) {
         this.user = user;
         this.password = password;
 
@@ -507,7 +502,7 @@
      * Return an {@link OutputStream} to write to. This method expects an XML document to be
      * written in that stream. To create a binary resource, use {@link #getBinaryOutputStream()}.
      */
-    public OutputStream getOutputStream() throws IOException, MalformedURLException {
+    public OutputStream getOutputStream() throws IOException {
         if (query != null) {
             throw new MalformedURLException("Cannot modify a resource that includes an XPATH expression");
         }
@@ -518,7 +513,7 @@
     /**
      * Return an {@link OutputStream} to write data to a binary resource.
      */
-    public OutputStream getBinaryOutputStream() throws IOException, MalformedURLException {
+    public OutputStream getBinaryOutputStream() throws IOException {
         if (query != null) {
             throw new MalformedURLException("Cannot modify a resource that includes an XPATH expression");
         }
@@ -600,9 +595,7 @@
                 service.removeCollection(collection.getName());
                 close(parent);
             }
-        } catch (SourceException se) {
-            throw se;
-        } catch (XMLDBException xdbe) {
+        } catch (XMLDBException e) {
             throw new SourceException("Could not delete " + getURI());
         } finally {
             cleanup();
@@ -656,7 +649,7 @@
             baos.write(b, off, len);
         }
 
-        public void close() throws IOException, SourceException {
+        public void close() throws IOException {
             if (!isClosed) {
                 writeOutputStream(baos, this.binary);
                 baos.close();
@@ -683,8 +676,6 @@
     public void makeCollection() throws SourceException {
         try {
             createCollection(url);
-        } catch (SourceException e) {
-            throw e;
         } catch (XMLDBException e) {
             throw new SourceException("Cannot make collection with " + getURI());
         }
@@ -713,15 +704,13 @@
 
             ArrayList children = new ArrayList(childColl.length + childRes.length);
             for (int i = 0; i < childColl.length; i++) {
-                children.add(new XMLDBSource(getLogger(), user, password, url + childColl[i]));
+                children.add(new XMLDBSource(user, password, url + childColl[i]));
             }
             for (int i = 0; i < childRes.length; i++) {
-                children.add(new XMLDBSource(getLogger(), user, password, url + childRes[i]));
+                children.add(new XMLDBSource(user, password, url + childRes[i]));
             }
             
             return children;
-        } catch (SourceException e) {
-            throw e;
         } catch (XMLDBException e) {
             throw new SourceException("Cannot list children of " + getURI());
         } finally {
@@ -734,7 +723,7 @@
             throw new SourceException("Resource at " + url + " can not have child resources.");
         }
 
-        return new XMLDBSource(getLogger(), user, password, url + name);
+        return new XMLDBSource(user, password, url + name);
     }
 
     public String getName() {
@@ -749,9 +738,9 @@
     public Source getParent() throws SourceException {
         if (resName == null) {
             int pos = colPath.lastIndexOf('/');
-            return new XMLDBSource(getLogger(), user, password, colPath.substring(0, pos + 1));
+            return new XMLDBSource(user, password, colPath.substring(0, pos + 1));
         }
 
-        return new XMLDBSource(getLogger(), user, password, colPath);
+        return new XMLDBSource(user, password, colPath);
     }
 }

Modified: cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSourceFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSourceFactory.java?rev=585361&r1=585360&r2=585361&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSourceFactory.java (original)
+++ cocoon/trunk/blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/components/source/impl/XMLDBSourceFactory.java Tue Oct 16 21:29:26 2007
@@ -24,11 +24,13 @@
 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.AbstractLogEnabled;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.components.source.helpers.SourceCredential;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceFactory;
+
+import org.apache.cocoon.components.source.helpers.SourceCredential;
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 import org.xmldb.api.DatabaseManager;
 import org.xmldb.api.base.Database;
 import org.xmldb.api.base.XMLDBException;
@@ -125,7 +127,7 @@
      * Resolve the source
      */
     public Source getSource(String location, Map parameters)
-    throws MalformedURLException, IOException {
+    throws IOException {
 
         int start = location.indexOf(':') + 1;
         int end = location.indexOf(':', start);
@@ -155,7 +157,7 @@
             }
         }
 
-        return new XMLDBSource(this.getLogger(), credential.getPrincipal(), credential.getPassword(), location);
+        return new XMLDBSource(credential.getPrincipal(), credential.getPassword(), location);
     }
 
     public void release(org.apache.excalibur.source.Source source) {



Mime
View raw message