(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 22 Jun 2010 19:36:24 +0000 (19:36 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 22 Jun 2010 19:36:24 +0000 (19:36 +0000)
pom.xml
security/jpatest/src/test/java/org/wamblee/security/authorization/jpa/JpaAuthorizationServiceTest.java
security/usermgt/src/main/java/org/wamblee/security/authentication/UserAdminInitializer.java
security/usermgt/src/main/java/org/wamblee/security/authorization/AuthorizationInitializer.java
security/usermgt/src/main/java/org/wamblee/security/authorization/UrlAuthorizationRule.java
security/usermgt/src/test/java/org/wamblee/security/authentication/UserAdministrationImplTest.java
support/spring/pom.xml

diff --git a/pom.xml b/pom.xml
index f9bc751dec8b68fa7da86a2568c26ee4a676315c..e1ec37979a601af68329cb48b78deb78ca57fd04 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -80,7 +80,7 @@
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
-            <version>1.8.0</version>
+            <version>1.8.5</version>
             <scope>test</scope>
         </dependency>
 
                 <version>${spring.version}</version>
             </dependency>
 
-            <!-- should be possible to remove the dependence on log4j -->
-            <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
-                <version>1.2.8</version>
-            </dependency>
             <dependency>
                 <groupId>dom4j</groupId>
                 <artifactId>dom4j</artifactId>
index a6f0ae333d791a5f0a54641af5dc1626992fab0f..43daaaf25e457d767ee727ae430ec8acf01e3081 100644 (file)
@@ -15,7 +15,9 @@
  */
 package org.wamblee.security.authorization.jpa;
 
-import org.apache.log4j.Logger;
+
+import java.util.logging.Logger;
+
 import org.wamblee.security.authentication.jpa.SecurityPersistenceUnit;
 import org.wamblee.security.authorization.AuthorizationService;
 import org.wamblee.security.authorization.AuthorizationServiceTest;
@@ -29,7 +31,7 @@ import org.wamblee.support.persistence.TransactionProxyFactory;
  */
 public class JpaAuthorizationServiceTest extends AuthorizationServiceTest {
     private static final Logger LOGGER = Logger
-        .getLogger(JpaAuthorizationServiceTest.class);
+        .getLogger(JpaAuthorizationServiceTest.class.getName());
 
     private static final String SERVICE_TABLE = "SEC_AUTH_SVC";
 
index 3c33319aa58ee3915d65efe80274dc466dfac85d..31a4d4653f6d4d187d90cfe33ab87c1ceca39168 100644 (file)
@@ -15,7 +15,7 @@
  */ 
 package org.wamblee.security.authentication;
 
-import org.apache.log4j.Logger;
+import java.util.logging.Logger;
 
 /**
  * User administration initializer. It populates the user administration with a
@@ -25,7 +25,7 @@ import org.apache.log4j.Logger;
  */
 public class UserAdminInitializer {
     private static final Logger LOGGER = Logger
-        .getLogger(UserAdminInitializer.class);
+        .getLogger(UserAdminInitializer.class.getName());
 
     /**
      * Initializes the user administration in case no users are present.
index 4ec00cddbe636ca656b0a51acbecb4d4899c9bcc..3c6e7c7deb029e013e0ff00a008c934d9404b25a 100644 (file)
@@ -15,7 +15,7 @@
  */ 
 package org.wamblee.security.authorization;
 
-import org.apache.log4j.Logger;
+import java.util.logging.Logger;
 
 /**
  * Inititializer class for authorization rules. This class initializes the
@@ -23,7 +23,7 @@ import org.apache.log4j.Logger;
  */
 public class AuthorizationInitializer {
     private static final Logger LOGGER = Logger
-        .getLogger(AuthorizationInitializer.class);
+        .getLogger(AuthorizationInitializer.class.getName());
 
     /**
      * Initializes authorization rules in case none are present.
index c68457559a42892ca2e3aa8739ee34ea88e41b73..2aa759cb7862d3f6eae8283a9d3f0fba7628e575 100644 (file)
@@ -17,6 +17,9 @@ package org.wamblee.security.authorization;
 
 import static org.wamblee.security.authorization.AuthorizationResult.*;
 
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import javax.persistence.Access;
 import javax.persistence.AccessType;
 import javax.persistence.CascadeType;
@@ -26,7 +29,6 @@ import javax.persistence.JoinColumn;
 import javax.persistence.OneToOne;
 import javax.persistence.Transient;
 
-import org.apache.log4j.Logger;
 import org.wamblee.security.authentication.UserAdministration;
 
 /**
@@ -52,7 +54,7 @@ import org.wamblee.security.authentication.UserAdministration;
 @Access(AccessType.PROPERTY)
 public abstract class UrlAuthorizationRule extends AbstractAuthorizationRule {
     private static final Logger LOGGER = Logger
-        .getLogger(UrlAuthorizationRule.class);
+        .getLogger(UrlAuthorizationRule.class.getName());
 
     /**
      * Result that the rule will return in case there is a match.
@@ -252,7 +254,7 @@ public abstract class UrlAuthorizationRule extends AbstractAuthorizationRule {
         try {
             resourceClass = Class.forName(aResourceClass);
         } catch (ClassNotFoundException e) {
-            LOGGER.error("Cannot find resource class '" + aResourceClass + "'",
+            LOGGER.log(Level.SEVERE, "Cannot find resource class '" + aResourceClass + "'",
                 e);
             throw new IllegalArgumentException(e.getMessage(), e);
         }
index 3bdcbf8de9b11636dcadb9bbfb287befc9513895..a0b32feab2657905a59a7e6619001a09f0e97b27 100644 (file)
 package org.wamblee.security.authentication;
 
 import java.util.List;
+import java.util.logging.Logger;
 
 import junit.framework.TestCase;
 
-import org.apache.log4j.Logger;
 import org.wamblee.security.authentication.UserMgtException.Reason;
 import org.wamblee.security.encryption.Md5HexMessageDigester;
 
@@ -30,7 +30,7 @@ import org.wamblee.security.encryption.Md5HexMessageDigester;
  */
 public class UserAdministrationImplTest extends TestCase {
     private static final Logger LOGGER = Logger
-        .getLogger(UserAdministrationImplTest.class);
+        .getLogger(UserAdministrationImplTest.class.getName());
 
     private static final String USER1 = "piet";
 
index c2c0288f916d193ed86c063a8fa3226ef0052552..f4406f1e0fdefdb243f342d76cf913777652d0ef 100644 (file)
       <groupId>org.springframework</groupId>
       <artifactId>spring-aop</artifactId>
     </dependency>
-    <!-- should be possible to remove the dependence on log4j -->
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
     <dependency>
       <groupId>dom4j</groupId>
       <artifactId>dom4j</artifactId>