jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r426653 - in /jackrabbit/trunk/contrib/classloader: ./ src/main/java/org/apache/jackrabbit/classloader/ src/main/java/org/apache/jackrabbit/net/ src/test/java/org/apache/jackrabbit/classloader/
Date Fri, 28 Jul 2006 19:40:54 GMT
Author: fmeschbe
Date: Fri Jul 28 12:40:53 2006
New Revision: 426653

URL: http://svn.apache.org/viewvc?rev=426653&view=rev
Log:
JCR-520 replace commons-logging by SLF4J

Modified:
    jackrabbit/trunk/contrib/classloader/project.xml
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ArchiveClassPathEntry.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassLoaderResource.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassPathEntry.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DirectoryClassPathEntry.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicPatternPath.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoader.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ExpandingArchiveClassPathEntry.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/NodeTypeSupport.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/PatternPath.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/RepositoryClassLoader.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/Util.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRJarURLConnection.java
    jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRURLConnection.java
    jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/ClassLoaderTestBase.java
    jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoaderTest.java

Modified: jackrabbit/trunk/contrib/classloader/project.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/project.xml?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/project.xml (original)
+++ jackrabbit/trunk/contrib/classloader/project.xml Fri Jul 28 12:40:53 2006
@@ -67,26 +67,15 @@
             <version>1.0</version>
             <type>jar</type>
         </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.0</version>
-            <type>jar</type>
-        </dependency>
 
-        <!-- Unit Testing -->
+        <!-- Logging -->
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>1.0</version>
-            <type>jar</type>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.8</version>
-            <type>jar</type>
+            <artifactId>slf4j-simple</artifactId>
+            <version>1.0.1</version>
         </dependency>
+
+        <!-- Unit Testing -->
         <dependency>
             <groupId>commons-collections</groupId>
             <artifactId>commons-collections</artifactId>

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ArchiveClassPathEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ArchiveClassPathEntry.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ArchiveClassPathEntry.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ArchiveClassPathEntry.java
Fri Jul 28 12:40:53 2006
@@ -29,9 +29,9 @@
 import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.net.URLFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -45,8 +45,8 @@
 class ArchiveClassPathEntry extends ClassPathEntry {
 
     /** Default logger */
-    private static final Log log =
-        LogFactory.getLog(ArchiveClassPathEntry.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(ArchiveClassPathEntry.class);
 
     /** The property containing the archive */
     private final Property prop;

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassLoaderResource.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassLoaderResource.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassLoaderResource.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassLoaderResource.java
Fri Jul 28 12:40:53 2006
@@ -26,9 +26,9 @@
 import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.net.URLFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -46,7 +46,8 @@
 class ClassLoaderResource {
 
     /** default log category */
-    private static final Log log = LogFactory.getLog(ClassLoaderResource.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(ClassLoaderResource.class);
 
     /**
      * The class path entry which loaded this class loader resource

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassPathEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassPathEntry.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassPathEntry.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ClassPathEntry.java
Fri Jul 28 12:40:53 2006
@@ -30,9 +30,9 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.net.URLFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The <code>ClassPathEntry</code> class encapsulates entries in the class path
@@ -45,11 +45,13 @@
  * This class is not intended to be subclassed or instantiated by clients.
  *
  * @author Felix Meschberger
+ * @version $Rev:$, $Date$
  */
 abstract class ClassPathEntry {
 
     /** default logging */
-    private static final Log log = LogFactory.getLog(ClassPathEntry.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(ClassPathEntry.class);
 
     /** The session assigned to this class path entry */
     protected final Session session;
@@ -246,8 +248,10 @@
      * resource to find and that (2) it is a relative name, that is it should
      * not have a leading slash.
      * <p>
-     * An example of a class to find would be : <code>com/day/test/Tester.class</code>
-     * which is converted from the generally used value <code>com.day.test.Tester</code>
+     * An example of a class to find would be :
+     * <code>org/apache/jackrabbit/test/Tester.class</code>
+     * which is converted from the generally used value
+     * <code>org.apache.jackrabbit.test.Tester</code>
      * by the caller.
      *
      * @param name The name of the resource to find.

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DirectoryClassPathEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DirectoryClassPathEntry.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DirectoryClassPathEntry.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DirectoryClassPathEntry.java
Fri Jul 28 12:40:53 2006
@@ -21,8 +21,8 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -37,8 +37,8 @@
 class DirectoryClassPathEntry extends ClassPathEntry {
 
     /** Default log */
-    private static final Log log =
-        LogFactory.getLog(DirectoryClassPathEntry.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(DirectoryClassPathEntry.class);
 
     /**
      * Creates an instance of the <code>DirectoryClassPathEntry</code> class.

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicPatternPath.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicPatternPath.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicPatternPath.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicPatternPath.java
Fri Jul 28 12:40:53 2006
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.classloader;
 
 import java.util.ArrayList;
-import java.util.Collection;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
@@ -26,8 +25,8 @@
 import javax.jcr.observation.EventListener;
 import javax.jcr.observation.ObservationManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The <code>DynamicPatternPath</code> class is a {@link PatternPath}
@@ -46,8 +45,8 @@
         implements EventListener {
 
     /** default logger */
-    private static final Log log =
-        LogFactory.getLog(DynamicPatternPath.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(DynamicPatternPath.class);
 
     /** The list of registered listeners for this list */
     private final ArrayList listeners = new ArrayList();

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoader.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoader.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoader.java
Fri Jul 28 12:40:53 2006
@@ -28,9 +28,9 @@
 import javax.jcr.observation.EventListener;
 import javax.jcr.observation.ObservationManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.classloader.DynamicPatternPath.Listener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -70,8 +70,8 @@
         implements EventListener, Listener {
 
     /** default log category */
-    private static final Log log =
-        LogFactory.getLog(DynamicRepositoryClassLoader.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(DynamicRepositoryClassLoader.class);
 
     /**
      * Cache of resources used to check class loader expiry. The map is indexed

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ExpandingArchiveClassPathEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ExpandingArchiveClassPathEntry.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ExpandingArchiveClassPathEntry.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/ExpandingArchiveClassPathEntry.java
Fri Jul 28 12:40:53 2006
@@ -34,8 +34,8 @@
 import javax.jcr.Workspace;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The <code>ExpandingArchiveClassPathEntry</code> extends the
@@ -64,8 +64,8 @@
     public static final String PROP_EXPAND_DATE = "rep:jarExpanded";
 
     /** Default logger */
-    private static final Log log =
-        LogFactory.getLog(ExpandingArchiveClassPathEntry.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(ExpandingArchiveClassPathEntry.class);
 
     /** The node of the unpacked JAR contents */
     private Node jarContents;

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/NodeTypeSupport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/NodeTypeSupport.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/NodeTypeSupport.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/NodeTypeSupport.java
Fri Jul 28 12:40:53 2006
@@ -18,20 +18,14 @@
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-import java.util.List;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Workspace;
+import javax.jcr.nodetype.NodeTypeManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
-import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
-import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader;
-import org.apache.jackrabbit.core.nodetype.compact.ParseException;
+import org.apache.jackrabbit.api.JackrabbitNodeTypeManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The <code>NodeTypeSupport</code> contains a single utility method
@@ -47,7 +41,8 @@
 /* package */ class NodeTypeSupport {
 
     /** Default log */
-    private static final Log log = LogFactory.getLog(NodeTypeSupport.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(NodeTypeSupport.class);
 
     /**
      * The name of the class path resource containing the node type definition
@@ -57,18 +52,12 @@
     private static final String TYPE_FILE = "type.cnd";
 
     /**
-     * The encoding used to read the node type definition file (value is
-     * "ISO-8859-1").
-     */
-    private static final String ENCODING = "ISO-8859-1";
-
-    /**
      * Registers the required node type (<code>rep:jarFile</code>) with the
      * node type manager available from the given <code>workspace</code>.
      * <p>
      * The <code>NodeTypeManager</code> returned by the <code>workspace</code>
      * is expected to be of type
-     * <code>org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl</code> for
+     * <code>org.apache.jackrabbit.api.JackrabbitNodeTypeManager</code> for
      * the node type registration to succeed.
      * <p>
      * This method is not synchronized. It is up to the calling method to
@@ -90,62 +79,24 @@
             return false;
         }
 
-        // Wrap the stream with a reader
-        InputStreamReader reader = null;
-        try {
-            reader = new InputStreamReader(ins, ENCODING);
-        } catch (UnsupportedEncodingException uee) {
-            log.warn("Required Encoding " + ENCODING + " not supported, " +
-                    "using platform default encoding", uee);
-
-            reader = new InputStreamReader(ins);
-        }
-
         try {
-            // Create a CompactNodeTypeDefReader
-            CompactNodeTypeDefReader cndReader =
-                new CompactNodeTypeDefReader(reader, TYPE_FILE);
-
-            // Get the List of NodeTypeDef objects
-            List ntdList = cndReader.getNodeTypeDefs();
-
-            // Get the NodeTypeManager from the Workspace.
-            // Note that it must be cast from the generic JCR NodeTypeManager
-            // to the Jackrabbit-specific implementation.
-            NodeTypeManagerImpl ntmgr =
-                (NodeTypeManagerImpl) workspace.getNodeTypeManager();
-
-            // Acquire the NodeTypeRegistry
-            NodeTypeRegistry ntreg = ntmgr.getNodeTypeRegistry();
-
-            // register the node types from the file in a batch
-            ntreg.registerNodeTypes(ntdList);
-
-            // get here and succeed
-            return true;
-
-        } catch (ParseException pe) {
-            log.error("Unexpected failure to parse compact node defintion " + TYPE_FILE,
pe);
-
-        } catch (InvalidNodeTypeDefException ie) {
-            log.error("Cannot define required node type", ie);
-
-        } catch (RepositoryException re) {
-            log.error("General problem accessing the repository", re);
-
-        } catch (ClassCastException cce) {
-            log.error("Unexpected object type encountered", cce);
-
-        } finally {
-            // make sure the reader is closed - expect to be non-null here !
-            try {
-                reader.close();
-            } catch (IOException ioe) {
-                // ignore
+            NodeTypeManager ntm = workspace.getNodeTypeManager();
+            if (ntm instanceof JackrabbitNodeTypeManager) {
+                log.debug("Using Jackrabbit to import node types from {0}",
+                    TYPE_FILE);
+                JackrabbitNodeTypeManager jntm = (JackrabbitNodeTypeManager) ntm;
+                jntm.registerNodeTypes(ins,
+                    JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
+                return true;
             }
+        } catch (IOException ioe) {
+            log.error("Cannot register node types from {0}", TYPE_FILE, ioe);
+        } catch (RepositoryException re) {
+            log.error("Cannot register node types from {0}", TYPE_FILE, re);
         }
 
         // fall back to failure
+        log.warn("Repository is not a Jackrabbit, cannot import node types");
         return false;
     }
 }

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/PatternPath.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/PatternPath.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/PatternPath.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/PatternPath.java
Fri Jul 28 12:40:53 2006
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.classloader;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 import java.util.StringTokenizer;
@@ -28,15 +27,10 @@
 import javax.jcr.PropertyIterator;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.observation.Event;
-import javax.jcr.observation.EventIterator;
-import javax.jcr.observation.EventListener;
-import javax.jcr.observation.ObservationManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.util.ChildrenCollectorFilter;
-import org.apache.jackrabbit.util.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The <code>PatternPath</code> implements a list of repository item path
@@ -80,7 +74,8 @@
 /* package */ class PatternPath {
 
     /** default logger */
-    private static final Log log = LogFactory.getLog(PatternPath.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(PatternPath.class);
 
     /** The session to access the repository */
     private final Session session;

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/RepositoryClassLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/RepositoryClassLoader.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/RepositoryClassLoader.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/RepositoryClassLoader.java
Fri Jul 28 12:40:53 2006
@@ -38,10 +38,10 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.net.JCRURLConnection;
 import org.apache.jackrabbit.net.URLFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -65,8 +65,8 @@
 public class RepositoryClassLoader extends URLClassLoader {
 
     /** default log category */
-    private static final Log log =
-        LogFactory.getLog(RepositoryClassLoader.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(RepositoryClassLoader.class);
 
     /** An empty list of url paths to call superclass constructor */
     private static final URL[] NULL_PATH = {};

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/Util.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/Util.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/Util.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/classloader/Util.java
Fri Jul 28 12:40:53 2006
@@ -24,11 +24,10 @@
 import javax.jcr.Property;
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
-import javax.jcr.Session;
 import javax.jcr.ValueFormatException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The <code>Util</code> provides helper methods for the repository classloader
@@ -42,7 +41,7 @@
 public class Util {
 
     /** default logging */
-    private static final Log log = LogFactory.getLog(Util.class);
+    private static final Logger log = LoggerFactory.getLogger(Util.class);
 
     /** Private constructor to not instantiate */
     private Util() {}

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRJarURLConnection.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRJarURLConnection.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRJarURLConnection.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRJarURLConnection.java
Fri Jul 28 12:40:53 2006
@@ -25,8 +25,8 @@
 import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The <code>JCRJarURLConnection</code> extends the
@@ -75,7 +75,8 @@
 public class JCRJarURLConnection extends JCRURLConnection {
 
     /** default log category */
-    private static final Log log = LogFactory.getLog(JCRJarURLConnection.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(JCRJarURLConnection.class);
 
     /**
      * The name of the MIME content type for this connection's content if

Modified: jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRURLConnection.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRURLConnection.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRURLConnection.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/main/java/org/apache/jackrabbit/net/JCRURLConnection.java
Fri Jul 28 12:40:53 2006
@@ -33,9 +33,9 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.classloader.Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -116,7 +116,8 @@
 public class JCRURLConnection extends URLConnection {
 
     /** Default logging */
-    private static final Log log = LogFactory.getLog(JCRURLConnection.class);
+    private static final Logger log =
+        LoggerFactory.getLogger(JCRURLConnection.class);
 
     /**
      * The name of the header containing the content size (value is

Modified: jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/ClassLoaderTestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/ClassLoaderTestBase.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/ClassLoaderTestBase.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/ClassLoaderTestBase.java
Fri Jul 28 12:40:53 2006
@@ -47,25 +47,23 @@
 
 import junit.framework.TestCase;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jackrabbit.core.RepositoryImpl;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory;
-
-import com.sun.corba.se.ActivationIDL.Repository;
-import com.sun.org.omg.CORBA.ExcDescriptionSeqHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The <code>ClassLoaderTestBase</code> TODO
  *
  * @author fmeschbe
+ * @version $Rev:$, $Date$
  */
 public class ClassLoaderTestBase extends TestCase {
 
     /** Logger for test cases */
-    protected static final Log log =
-        LogFactory.getLog("org.apache.jackrabbit.classloader.test");
+    protected static final Logger log =
+        LoggerFactory.getLogger("org.apache.jackrabbit.classloader.test");
 
     protected static final String WORKSPACE = "default";
     protected static final String USER = "admin";

Modified: jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoaderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoaderTest.java?rev=426653&r1=426652&r2=426653&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoaderTest.java
(original)
+++ jackrabbit/trunk/contrib/classloader/src/test/java/org/apache/jackrabbit/classloader/DynamicRepositoryClassLoaderTest.java
Fri Jul 28 12:40:53 2006
@@ -17,13 +17,8 @@
 package org.apache.jackrabbit.classloader;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.URL;
 import java.util.Enumeration;
-
-import org.apache.log4j.Logger;
-
-import sun.tools.jar.resources.jar_fr;
 
 /**
  * The <code>DynamicRepositoryClassLoaderTest</code> class



Mime
View raw message