directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cp...@apache.org
Subject [05/15] directory-fortress-core git commit: refactored to not use static initialization blocks
Date Thu, 05 May 2016 13:49:22 GMT
refactored to not use static initialization blocks


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/908a0734
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/908a0734
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/908a0734

Branch: refs/heads/master
Commit: 908a073484dd77f0d3bffa25a50ba99be1e63561
Parents: 2ebaebb
Author: clp207 <clp207@psu.edu>
Authored: Wed Apr 20 13:40:00 2016 -0400
Committer: clp207 <clp207@psu.edu>
Committed: Wed Apr 20 13:40:00 2016 -0400

----------------------------------------------------------------------
 .../fortress/core/AccelMgrFactory.java          |   5 +-
 .../fortress/core/AccessMgrFactory.java         |   9 +-
 .../fortress/core/AdminMgrFactory.java          |  10 +-
 .../fortress/core/AuditMgrFactory.java          |  12 ++-
 .../fortress/core/ConfigMgrFactory.java         |  11 +-
 .../fortress/core/DelAccessMgrFactory.java      |  12 ++-
 .../fortress/core/DelAdminMgrFactory.java       |  10 +-
 .../fortress/core/DelReviewMgrFactory.java      |   9 +-
 .../directory/fortress/core/GlobalIds.java      |  52 ++++++---
 .../fortress/core/GroupMgrFactory.java          |   8 +-
 .../fortress/core/PwPolicyMgrFactory.java       |  12 ++-
 .../fortress/core/ReviewMgrFactory.java         |  10 +-
 .../fortress/core/ant/FortressAntTask.java      |  36 +++----
 .../fortress/core/impl/AccelMgrImpl.java        |   3 +-
 .../fortress/core/impl/AcceleratorDAO.java      |  17 +--
 .../fortress/core/impl/AccessMgrImpl.java       |  34 +++---
 .../fortress/core/impl/AdminMgrImpl.java        |  30 +++---
 .../fortress/core/impl/AdminRoleP.java          |  15 ++-
 .../directory/fortress/core/impl/AuditDAO.java  |  35 +++---
 .../directory/fortress/core/impl/AuditP.java    |   3 +-
 .../directory/fortress/core/impl/ConfigDAO.java |  17 +--
 .../fortress/core/impl/DSDChecker.java          |  16 +--
 .../fortress/core/impl/DelAccessMgrImpl.java    |  28 +++--
 .../fortress/core/impl/DelAdminMgrImpl.java     |  61 ++++++-----
 .../fortress/core/impl/DelReviewMgrImpl.java    |  17 ++-
 .../directory/fortress/core/impl/GroupDAO.java  |  56 +++++-----
 .../fortress/core/impl/GroupMgrImpl.java        |   6 +-
 .../directory/fortress/core/impl/GroupP.java    |  19 ++--
 .../fortress/core/impl/OrgUnitDAO.java          |  21 ++--
 .../directory/fortress/core/impl/OrgUnitP.java  |  23 ++--
 .../core/impl/OrganizationalUnitDAO.java        |   7 +-
 .../directory/fortress/core/impl/PermDAO.java   |  33 +++---
 .../directory/fortress/core/impl/PermP.java     |   6 +-
 .../directory/fortress/core/impl/PolicyDAO.java |   7 +-
 .../directory/fortress/core/impl/PolicyP.java   |  17 +--
 .../directory/fortress/core/impl/PsoUtil.java   |  47 +++++---
 .../fortress/core/impl/PwPolicyMgrImpl.java     |  15 ++-
 .../fortress/core/impl/ReviewMgrImpl.java       |  21 ++--
 .../directory/fortress/core/impl/RoleDAO.java   |  15 +--
 .../directory/fortress/core/impl/RoleP.java     |   3 +-
 .../directory/fortress/core/impl/RoleUtil.java  |  55 ++++++----
 .../directory/fortress/core/impl/SDUtil.java    |  76 +++++++------
 .../directory/fortress/core/impl/SdDAO.java     |  11 +-
 .../directory/fortress/core/impl/SdP.java       |   3 +-
 .../directory/fortress/core/impl/SuffixDAO.java |   9 +-
 .../directory/fortress/core/impl/UserDAO.java   |  71 ++++++------
 .../directory/fortress/core/impl/UserP.java     |   6 +-
 .../directory/fortress/core/impl/UsoUtil.java   |  45 +++++---
 .../fortress/core/ldap/LdapDataProvider.java    | 107 ++++++++++---------
 .../fortress/core/model/ConstraintUtil.java     |  26 ++---
 .../directory/fortress/core/model/PropUtil.java |   6 +-
 .../fortress/core/model/UserAdminRole.java      |  24 ++---
 .../directory/fortress/core/model/UserRole.java |  18 ++--
 .../fortress/core/rest/AccessMgrRestImpl.java   |  34 +++---
 .../fortress/core/rest/AdminMgrRestImpl.java    |  82 +++++++-------
 .../fortress/core/rest/AuditMgrRestImpl.java    |  20 ++--
 .../fortress/core/rest/ConfigMgrRestImpl.java   |  16 +--
 .../core/rest/DelAccessMgrRestImpl.java         |  38 +++----
 .../fortress/core/rest/DelAdminMgrRestImpl.java |  56 +++++-----
 .../core/rest/DelReviewMgrRestImpl.java         |  12 +--
 .../fortress/core/rest/PwPolicyMgrRestImpl.java |  20 ++--
 .../directory/fortress/core/rest/RestUtils.java |  86 ++++++++++-----
 .../fortress/core/rest/ReviewMgrRestImpl.java   |  84 +++++++--------
 .../directory/fortress/core/util/Config.java    |   9 +-
 .../directory/fortress/core/util/RegExUtil.java |  28 +++--
 .../directory/fortress/core/util/VUtil.java     |  36 +++++--
 .../fortress/core/util/cache/CacheMgr.java      |  44 ++++----
 .../fortress/core/util/crypto/EncryptUtil.java  |  29 +++--
 .../fortress/core/AdminMgrConsole.java          |  28 ++---
 .../fortress/core/EncryptMgrConsole.java        |   4 +-
 .../core/example/ExampleAdminMgrFactory.java    |   4 +-
 .../fortress/core/example/ExampleDAO.java       |  28 ++---
 .../fortress/core/impl/FortressJUnitTest.java   |  19 ++--
 73 files changed, 1101 insertions(+), 801 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java
index 898d0a7..fabea9f 100644
--- a/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AccelMgrFactory.java
@@ -20,9 +20,9 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.impl.AccelMgrImpl;
 import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -35,7 +35,6 @@ import org.apache.directory.fortress.core.util.VUtil;
  */
 public final class AccelMgrFactory
 {
-    private static String accelClassName = Config.getProperty(GlobalIds.ACCEL_IMPLEMENTATION);
     private static final String CLS_NM = AccelMgrFactory.class.getName();
 
     /**
@@ -60,6 +59,8 @@ public final class AccelMgrFactory
     public static AccelMgr createInstance(String contextId)
         throws SecurityException
     {
+    	String accelClassName = Config.getInstance().getProperty(GlobalIds.ACCEL_IMPLEMENTATION);
+    	
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
         AccelMgr accelMgr;
         if ( StringUtils.isEmpty( accelClassName ) )

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
index bceb210..54a924b 100755
--- a/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AccessMgrFactory.java
@@ -20,10 +20,10 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.impl.AccessMgrImpl;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.rest.AccessMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -38,7 +38,6 @@ import org.apache.directory.fortress.core.util.VUtil;
  */
 public final class AccessMgrFactory
 {
-    private static String accessClassName = Config.getProperty(GlobalIds.ACCESS_IMPLEMENTATION);
     private static final String CLS_NM = AccessMgrFactory.class.getName();
 
     /**
@@ -64,10 +63,12 @@ public final class AccessMgrFactory
     {
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
 
+        String accessClassName = Config.getInstance().getProperty(GlobalIds.ACCESS_IMPLEMENTATION);
+        
         AccessMgr accessMgr;
         if ( StringUtils.isEmpty( accessClassName ) )
         {
-            if(GlobalIds.IS_REST)
+            if(GlobalIds.getInstance().IS_REST)
             {
                 accessMgr = new AccessMgrRestImpl();
             }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java
index d1b695c..d95c686 100755
--- a/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AdminMgrFactory.java
@@ -20,11 +20,11 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.impl.AdminMgrImpl;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.AdminMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -39,7 +39,6 @@ import org.apache.directory.fortress.core.util.VUtil;
  */
 public final class AdminMgrFactory
 {
-    private static String adminClassName = Config.getProperty(GlobalIds.ADMIN_IMPLEMENTATION);
     private static final String CLS_NM = AdminMgrFactory.class.getName();
 
     /**
@@ -65,11 +64,14 @@ public final class AdminMgrFactory
         throws SecurityException
     {
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
+        
+        String adminClassName = Config.getInstance().getProperty(GlobalIds.ADMIN_IMPLEMENTATION);
+        
         AdminMgr adminMgr;
 
         if ( StringUtils.isEmpty( adminClassName ) )
         {
-            if(GlobalIds.IS_REST)
+            if(GlobalIds.getInstance().IS_REST)
             {
                 adminMgr = new AdminMgrRestImpl();
             }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java
index d486ac9..168ba29 100755
--- a/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/AuditMgrFactory.java
@@ -20,11 +20,11 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.impl.AuditMgrImpl;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.AuditMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -37,8 +37,7 @@ import org.apache.directory.fortress.core.util.VUtil;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public final class AuditMgrFactory
-{
-    private static String auditClassName = Config.getProperty(GlobalIds.AUDIT_IMPLEMENTATION);
+{    
     private static final String CLS_NM = AuditMgrFactory.class.getName();
 
     /**
@@ -64,11 +63,14 @@ public final class AuditMgrFactory
         throws SecurityException
     {
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
+        
+        String auditClassName = Config.getInstance().getProperty(GlobalIds.AUDIT_IMPLEMENTATION);
+        
         AuditMgr auditMgr;
 
         if ( StringUtils.isEmpty( auditClassName ) )
         {
-            if(GlobalIds.IS_REST)
+            if(GlobalIds.getInstance().IS_REST)
             {
                 auditMgr = new AuditMgrRestImpl();
             }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java
index 8eb481d..6d85d3f 100755
--- a/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/ConfigMgrFactory.java
@@ -19,10 +19,10 @@
  */
 package org.apache.directory.fortress.core;
 
-import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.impl.ConfigMgrImpl;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.rest.ConfigMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 
 /**
  * Creates an instance of the ConfigMgr object.
@@ -35,10 +35,8 @@ import org.apache.directory.fortress.core.rest.ConfigMgrRestImpl;
  */
 public final class ConfigMgrFactory
 {
-    private static String configClassName = Config.getProperty( GlobalIds.CONFIG_IMPLEMENTATION );
     private final static String ENABLE_REST = "enable.mgr.impl.rest";
-    private static final boolean IS_REST = ((Config.getProperty(ENABLE_REST) != null) && (Config.getProperty(ENABLE_REST).equalsIgnoreCase("true")));
-
+    
     private ConfigMgrFactory()
     {
 
@@ -53,6 +51,9 @@ public final class ConfigMgrFactory
     public static ConfigMgr createInstance()
         throws SecurityException
     {
+    	String configClassName = Config.getInstance().getProperty( GlobalIds.CONFIG_IMPLEMENTATION );
+    	boolean IS_REST = ((Config.getInstance().getProperty(ENABLE_REST) != null) && (Config.getInstance().getProperty(ENABLE_REST).equalsIgnoreCase("true")));
+    	
         if (configClassName == null || configClassName.compareTo("") == 0)
         {
             if(IS_REST)

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java
index 2b5b555..738d400 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelAccessMgrFactory.java
@@ -20,11 +20,11 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.impl.DelAccessMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.DelAccessMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -36,8 +36,7 @@ import org.apache.directory.fortress.core.util.VUtil;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public final class DelAccessMgrFactory
-{
-    private static String accessClassName = Config.getProperty(GlobalIds.DELEGATED_ACCESS_IMPLEMENTATION);
+{    
     private static final String CLS_NM = DelAccessMgrFactory.class.getName();
 
     /**
@@ -64,11 +63,14 @@ public final class DelAccessMgrFactory
         throws SecurityException
     {
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
+        
+        String accessClassName = Config.getInstance().getProperty(GlobalIds.DELEGATED_ACCESS_IMPLEMENTATION);
+        
         DelAccessMgr accessMgr;
 
         if ( StringUtils.isEmpty( accessClassName ) )
         {
-            if(GlobalIds.IS_REST)
+            if(GlobalIds.getInstance().IS_REST)
             {
                 accessMgr = new DelAccessMgrRestImpl();
             }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java
index 6a5f393..9ff0a7a 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelAdminMgrFactory.java
@@ -20,11 +20,11 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.directory.api.util.Strings;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.impl.DelAdminMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.DelAdminMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -38,7 +38,6 @@ import org.apache.directory.fortress.core.util.VUtil;
  */
 public final class DelAdminMgrFactory
 {
-    private static String dAdminClassName = Config.getProperty(GlobalIds.DELEGATED_ADMIN_IMPLEMENTATION);
     private static final String CLS_NM = DelAdminMgrFactory.class.getName();
     private static final String CREATE_INSTANCE_METHOD = CLS_NM + ".createInstance";
 
@@ -65,11 +64,14 @@ public final class DelAdminMgrFactory
         throws SecurityException
     {
         VUtil.assertNotNull( contextId, GlobalErrIds.CONTEXT_NULL, CREATE_INSTANCE_METHOD );
+        
+        String dAdminClassName = Config.getInstance().getProperty(GlobalIds.DELEGATED_ADMIN_IMPLEMENTATION);
+        
         DelAdminMgr delAdminMgr;
 
         if ( Strings.isEmpty( dAdminClassName ) )
         {
-            if ( GlobalIds.IS_REST )
+            if ( GlobalIds.getInstance().IS_REST )
             {
                 delAdminMgr = new DelAdminMgrRestImpl();
             }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java
index 70229f7..4264601 100755
--- a/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/DelReviewMgrFactory.java
@@ -20,11 +20,11 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.impl.DelReviewMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.DelReviewMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -37,7 +37,6 @@ import org.apache.directory.fortress.core.util.VUtil;
  */
 public final class DelReviewMgrFactory
 {
-    private static String dReviewClassName = Config.getProperty(GlobalIds.DELEGATED_REVIEW_IMPLEMENTATION);
     private static final String CLS_NM = DelReviewMgrFactory.class.getName();
 
     /**
@@ -63,11 +62,13 @@ public final class DelReviewMgrFactory
         throws SecurityException
     {
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
+        String dReviewClassName = Config.getInstance().getProperty(GlobalIds.DELEGATED_REVIEW_IMPLEMENTATION);
+        
         DelReviewMgr delReviewMgr;
 
         if ( StringUtils.isEmpty( dReviewClassName ) )
         {
-            if(GlobalIds.IS_REST)
+            if(GlobalIds.getInstance().IS_REST)
             {
                 delReviewMgr = new DelReviewMgrRestImpl();
             }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/GlobalIds.java b/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
index 51bb710..0fe67a3 100755
--- a/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
+++ b/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
@@ -40,22 +40,51 @@ public final class GlobalIds
 {
     public static final String CONFIG_ROOT_PARAM = "config.root";
 
+    private static volatile GlobalIds INSTANCE = null; 
+
+    public static GlobalIds getInstance() {
+        if(INSTANCE == null) {
+            synchronized (GlobalIds.class) {
+                if(INSTANCE == null){
+        	        INSTANCE = new GlobalIds();
+                }
+            }
+        }
+        return INSTANCE;
+    }
+    
     /**
      * Private constructor
      *
      */
     private GlobalIds()
     {
+    	init();
+    	
+    	IS_AUDIT_DISABLED = ( ( Config.getInstance().getProperty( DISABLE_AUDIT ) != null ) && ( Config
+    	        .getInstance().getProperty( DISABLE_AUDIT ).equalsIgnoreCase( "true" ) ) );
+    	
+    	IS_REST = ( ( Config.getInstance().getProperty( ENABLE_REST ) != null ) && ( Config
+    	        .getInstance().getProperty( ENABLE_REST ).equalsIgnoreCase( "true" ) ) );
+    	
+    	IS_REALM = GlobalIds.REALM_TYPE.equalsIgnoreCase( Config
+    	        .getInstance().getProperty( GlobalIds.AUTHENTICATION_TYPE ) );
+    	
+    	IS_OPENLDAP = ( ( Config.getInstance().getProperty( SERVER_TYPE ) != null ) && ( Config
+    	        .getInstance().getProperty( SERVER_TYPE ).equalsIgnoreCase( "openldap" ) ) );
+    	
+    	LDAP_FILTER_SIZE_FOUND = ( Config
+    	        .getInstance().getProperty( LDAP_FILTER_SIZE_PROP ) != null );
+    	
+    	DELIMITER = Config.getInstance().getProperty( "attr.delimiter", "$" );
     }
 
     public static final String HOME = "HOME";
     public static final String TENANT = "tenant";
     private static final String DISABLE_AUDIT = "disable.audit";
-    public static final boolean IS_AUDIT_DISABLED = ( ( Config.getProperty( DISABLE_AUDIT ) != null ) && ( Config
-        .getProperty( DISABLE_AUDIT ).equalsIgnoreCase( "true" ) ) );
+    public boolean IS_AUDIT_DISABLED;
     private static final String ENABLE_REST = "enable.mgr.impl.rest";
-    public static final boolean IS_REST = ( ( Config.getProperty( ENABLE_REST ) != null ) && ( Config
-        .getProperty( ENABLE_REST ).equalsIgnoreCase( "true" ) ) );
+    public boolean IS_REST;
 
     /**
      * The following constants are used within the factory classes:
@@ -147,8 +176,7 @@ public final class GlobalIds
      * the authentication module will not throw SecurityException on password resets.  This is to enable the authentication
      * event to succeed allowing the application to prompt user to change their password.
      */
-    public static final boolean IS_REALM = GlobalIds.REALM_TYPE.equalsIgnoreCase( Config
-        .getProperty( GlobalIds.AUTHENTICATION_TYPE ) );
+    public boolean IS_REALM;
 
     /**
      * Parameter specifies the distinguished name (dn) of the LDAP suffix.  The is the root or top-most node for a Directory Information Tree (DIT).  The typical
@@ -234,8 +262,7 @@ public final class GlobalIds
     */
 
     public static final String SERVER_TYPE = "ldap.server.type";
-    public static final boolean IS_OPENLDAP = ( ( Config.getProperty( SERVER_TYPE ) != null ) && ( Config
-        .getProperty( SERVER_TYPE ).equalsIgnoreCase( "openldap" ) ) );
+    public boolean IS_OPENLDAP;
 
     /*
       *  *************************************************************************
@@ -439,8 +466,7 @@ public final class GlobalIds
     /**
      * Used during ldap filter processing.
      */
-    public static final boolean LDAP_FILTER_SIZE_FOUND = ( Config
-        .getProperty( LDAP_FILTER_SIZE_PROP ) != null );
+    public boolean LDAP_FILTER_SIZE_FOUND;
     public static final String APACHE_LDAP_API = "apache";
     public static final String AUTH_Z_FAILED = "authzfailed";
     public static final String POP_NAME = "ftOpNm";
@@ -473,11 +499,11 @@ public final class GlobalIds
     /**
      * enable the ldap filter size variable to be used later during filter processing.
      */
-    static
+    private void init()
     {
         try
         {
-            String lenProp = Config.getProperty( LDAP_FILTER_SIZE_PROP );
+            String lenProp = Config.getInstance().getProperty( LDAP_FILTER_SIZE_PROP );
             if ( LDAP_FILTER_SIZE_FOUND )
             {
                 ldapFilterSize = Integer.valueOf( lenProp );
@@ -510,7 +536,7 @@ public final class GlobalIds
      * Fortress stores complex attribute types within a single attribute in ldap.  Usually a delimiter of '$' is used for string tokenization.
      * format: {@code part1$part2$part3....}  Stored in fortress.properties as 'attr.delimiter=$'
      */
-    public static final String DELIMITER = Config.getProperty( "attr.delimiter", "$" );
+    public String DELIMITER;
 
     /**
      * Maximum number of records for ldap client to wait on while processing results sets from ldap server.

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/GroupMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/GroupMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/GroupMgrFactory.java
index 770d506..7b3473c 100755
--- a/src/main/java/org/apache/directory/fortress/core/GroupMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/GroupMgrFactory.java
@@ -21,9 +21,9 @@ package org.apache.directory.fortress.core;
 
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.fortress.core.impl.GroupMgrImpl;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.model.Session;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -35,8 +35,7 @@ import org.apache.directory.fortress.core.util.VUtil;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public final class GroupMgrFactory
-{
-    private static String groupClassName = Config.getProperty( GlobalIds.GROUP_IMPLEMENTATION );
+{    
     private static final String CLS_NM = GroupMgrFactory.class.getName();
     private static final String CREATE_INSTANCE_METHOD = CLS_NM + ".createInstance";
 
@@ -70,6 +69,7 @@ public final class GroupMgrFactory
         throws SecurityException
     {
         VUtil.assertNotNull( contextId, GlobalErrIds.CONTEXT_NULL, CREATE_INSTANCE_METHOD );
+        String groupClassName = Config.getInstance().getProperty( GlobalIds.GROUP_IMPLEMENTATION );
         
         if ( Strings.isEmpty( groupClassName ) )
         {

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java
index bacfe0b..92a24e6 100755
--- a/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/PwPolicyMgrFactory.java
@@ -20,11 +20,11 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.impl.PwPolicyMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.PwPolicyMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -36,8 +36,7 @@ import org.apache.directory.fortress.core.util.VUtil;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public final class PwPolicyMgrFactory
-{
-    private static String policyClassName = Config.getProperty(GlobalIds.PSWD_POLICY_IMPLEMENTATION);
+{    
     private static final String CLS_NM = PwPolicyMgrFactory.class.getName();
 
     /**
@@ -63,11 +62,14 @@ public final class PwPolicyMgrFactory
         throws SecurityException
     {
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
+        
+        String policyClassName = Config.getInstance().getProperty(GlobalIds.PSWD_POLICY_IMPLEMENTATION);
+        
         PwPolicyMgr policyMgr;
 
         if ( StringUtils.isEmpty( policyClassName ) )
         {
-            if(GlobalIds.IS_REST)
+            if(GlobalIds.getInstance().IS_REST)
             {
                 policyMgr = new PwPolicyMgrRestImpl();
             }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java b/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java
index 1d65835..557b605 100755
--- a/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/ReviewMgrFactory.java
@@ -20,11 +20,11 @@
 package org.apache.directory.fortress.core;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.impl.ReviewMgrImpl;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.rest.ReviewMgrRestImpl;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.VUtil;
 
 /**
@@ -37,7 +37,6 @@ import org.apache.directory.fortress.core.util.VUtil;
  */
 public final class ReviewMgrFactory
 {
-    private static String reviewClassName = Config.getProperty(GlobalIds.REVIEW_IMPLEMENTATION);
     private static final String CLS_NM = ReviewMgrFactory.class.getName();
 
     /**
@@ -63,11 +62,14 @@ public final class ReviewMgrFactory
         throws SecurityException
     {
         VUtil.assertNotNull(contextId, GlobalErrIds.CONTEXT_NULL, CLS_NM + ".createInstance");
+        
+        String reviewClassName = Config.getInstance().getProperty(GlobalIds.REVIEW_IMPLEMENTATION);
+        
         ReviewMgr reviewMgr;
 
         if ( StringUtils.isEmpty( reviewClassName ) )
         {
-            if(GlobalIds.IS_REST)
+            if(GlobalIds.getInstance().IS_REST)
             {
                 reviewMgr = new ReviewMgrRestImpl();
             }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java b/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java
index d6a7b53..1d1eff0 100755
--- a/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java
+++ b/src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java
@@ -28,50 +28,48 @@ import java.util.StringTokenizer;
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.fortress.core.model.PropUtil;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.input.InputHandler;
-import org.apache.tools.ant.input.InputRequest;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.model.Group;
-import org.apache.directory.fortress.core.GroupMgr;
-import org.apache.directory.fortress.core.GroupMgrFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.directory.fortress.core.AdminMgr;
 import org.apache.directory.fortress.core.AdminMgrFactory;
 import org.apache.directory.fortress.core.CfgException;
+import org.apache.directory.fortress.core.ConfigMgr;
+import org.apache.directory.fortress.core.ConfigMgrFactory;
 import org.apache.directory.fortress.core.DelAdminMgr;
 import org.apache.directory.fortress.core.DelAdminMgrFactory;
 import org.apache.directory.fortress.core.GlobalErrIds;
 import org.apache.directory.fortress.core.GlobalIds;
+import org.apache.directory.fortress.core.GroupMgr;
+import org.apache.directory.fortress.core.GroupMgrFactory;
 import org.apache.directory.fortress.core.PwPolicyMgr;
 import org.apache.directory.fortress.core.PwPolicyMgrFactory;
 import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.ConfigMgr;
-import org.apache.directory.fortress.core.ConfigMgrFactory;
-import org.apache.directory.fortress.core.model.OrganizationalUnit;
 import org.apache.directory.fortress.core.impl.OrganizationalUnitP;
-import org.apache.directory.fortress.core.model.Suffix;
 import org.apache.directory.fortress.core.impl.SuffixP;
-
 import org.apache.directory.fortress.core.model.AdminRole;
-import org.apache.directory.fortress.core.util.ClassUtil;
 import org.apache.directory.fortress.core.model.Context;
+import org.apache.directory.fortress.core.model.Group;
 import org.apache.directory.fortress.core.model.OrgUnit;
+import org.apache.directory.fortress.core.model.OrganizationalUnit;
 import org.apache.directory.fortress.core.model.PermGrant;
 import org.apache.directory.fortress.core.model.PermObj;
 import org.apache.directory.fortress.core.model.Permission;
+import org.apache.directory.fortress.core.model.PropUtil;
 import org.apache.directory.fortress.core.model.PwPolicy;
 import org.apache.directory.fortress.core.model.Relationship;
 import org.apache.directory.fortress.core.model.Role;
 import org.apache.directory.fortress.core.model.SDSet;
+import org.apache.directory.fortress.core.model.Suffix;
 import org.apache.directory.fortress.core.model.User;
 import org.apache.directory.fortress.core.model.UserAdminRole;
 import org.apache.directory.fortress.core.model.UserRole;
+import org.apache.directory.fortress.core.util.ClassUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.Testable;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.input.InputHandler;
+import org.apache.tools.ant.input.InputRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -948,7 +946,7 @@ public class FortressAntTask extends Task implements InputHandler
             LOG.info( "DEBUG MODE" );
             try
             {
-                String testClassName = Config.getProperty( getTaskName() );
+                String testClassName = Config.getInstance().getProperty( getTaskName() );
                 if ( StringUtils.isEmpty( testClassName ) )
                 {
                     testClassName = "org.apache.directory.fortress.core.impl.FortressAntLoadTest";

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/AccelMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/AccelMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/AccelMgrImpl.java
index 021aa15..8f69326 100644
--- a/src/main/java/org/apache/directory/fortress/core/impl/AccelMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AccelMgrImpl.java
@@ -77,7 +77,7 @@ import org.apache.directory.fortress.core.util.VUtil;
 public class AccelMgrImpl extends Manageable implements AccelMgr, Serializable
 {
     private static final String CLS_NM = AccessMgrImpl.class.getName();
-    private static final AcceleratorDAO aDao = new org.apache.directory.fortress.core.impl.AcceleratorDAO();
+    private AcceleratorDAO aDao;
 
 
     /**
@@ -85,6 +85,7 @@ public class AccelMgrImpl extends Manageable implements AccelMgr, Serializable
      */
     public AccelMgrImpl()
     {
+    	aDao = new org.apache.directory.fortress.core.impl.AcceleratorDAO();
     }
 
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/AcceleratorDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/AcceleratorDAO.java b/src/main/java/org/apache/directory/fortress/core/impl/AcceleratorDAO.java
index 2bf3f7f..af14943 100644
--- a/src/main/java/org/apache/directory/fortress/core/impl/AcceleratorDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AcceleratorDAO.java
@@ -20,15 +20,21 @@
 package org.apache.directory.fortress.core.impl;
 
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.fortress.core.SecurityException;
+import org.apache.directory.fortress.core.ldap.LdapDataProvider;
 import org.apache.directory.fortress.core.model.Permission;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.model.User;
 import org.apache.directory.fortress.core.model.UserRole;
+import org.apache.directory.ldap.client.api.LdapConnection;
 import org.openldap.accelerator.api.addRole.RbacAddRoleRequest;
 import org.openldap.accelerator.api.addRole.RbacAddRoleRequestImpl;
 import org.openldap.accelerator.api.addRole.RbacAddRoleResponse;
@@ -49,12 +55,6 @@ import org.openldap.accelerator.api.sessionRoles.RbacSessionRolesRequestImpl;
 import org.openldap.accelerator.api.sessionRoles.RbacSessionRolesResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.ldap.LdapDataProvider;
-import org.apache.directory.ldap.client.api.LdapConnection;
-
-import java.util.ArrayList;
-import java.util.List;
 
 
 /**
@@ -70,7 +70,10 @@ final class AcceleratorDAO extends LdapDataProvider
 {
     private static final Logger LOG = LoggerFactory.getLogger( AcceleratorDAO.class.getName() );
 
-
+    public AcceleratorDAO(){
+    	super();
+    }
+    
     /**
      * Authenticate user and return sessionId inside {@link org.apache.directory.fortress.core.model.Session#sessionId}.
      * This function follows the pattern from: {@link org.apache.directory.fortress.core.AccessMgr#createSession(org.apache.directory.fortress.core.model.User, boolean)}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/AccessMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/AccessMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/AccessMgrImpl.java
index 465973b..c4ae52a 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/AccessMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AccessMgrImpl.java
@@ -90,8 +90,8 @@ public class AccessMgrImpl extends Manageable implements AccessMgr, Serializable
         throws SecurityException
     {
         String methodName = "authenticate";
-        VUtil.assertNotNullOrEmpty( userId, GlobalErrIds.USER_ID_NULL, getFullMethodName( CLS_NM, methodName ) );
-        VUtil.assertNotNullOrEmpty( password, GlobalErrIds.USER_PW_NULL, getFullMethodName( CLS_NM, methodName ) );
+        VUtil.getInstance().assertNotNullOrEmpty( userId, GlobalErrIds.USER_ID_NULL, getFullMethodName( CLS_NM, methodName ) );
+        VUtil.getInstance().assertNotNullOrEmpty( password, GlobalErrIds.USER_PW_NULL, getFullMethodName( CLS_NM, methodName ) );
         User inUser = new User( userId );
         inUser.setContextId( contextId );
 
@@ -130,12 +130,12 @@ public class AccessMgrImpl extends Manageable implements AccessMgr, Serializable
         assertContext( CLS_NM, methodName, perm, GlobalErrIds.PERM_NULL );
         assertContext( CLS_NM, methodName, session, GlobalErrIds.USER_SESS_NULL );
         
-        VUtil.assertNotNullOrEmpty( perm.getOpName(), GlobalErrIds.PERM_OPERATION_NULL,
+        VUtil.getInstance().assertNotNullOrEmpty( perm.getOpName(), GlobalErrIds.PERM_OPERATION_NULL,
             getFullMethodName( CLS_NM, methodName ) );
-        VUtil.assertNotNullOrEmpty( perm.getObjName(), GlobalErrIds.PERM_OBJECT_NULL,
+        VUtil.getInstance().assertNotNullOrEmpty( perm.getObjName(), GlobalErrIds.PERM_OBJECT_NULL,
             getFullMethodName( CLS_NM, methodName ) );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.USER, false );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.ROLE, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.USER, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.ROLE, false );
         setEntitySession(CLS_NM, methodName, session);
         return permP.checkPermission( session, perm );
     }
@@ -150,8 +150,8 @@ public class AccessMgrImpl extends Manageable implements AccessMgr, Serializable
     {
         String methodName = "sessionPermissions";
         assertContext( CLS_NM, methodName, session, GlobalErrIds.USER_SESS_NULL );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.USER, false );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.ROLE, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.USER, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.ROLE, false );
         setEntitySession(CLS_NM, methodName, session);
         return permP.search( session );
     }
@@ -166,8 +166,8 @@ public class AccessMgrImpl extends Manageable implements AccessMgr, Serializable
     {
         String methodName = "sessionRoles";
         assertContext( CLS_NM, methodName, session, GlobalErrIds.USER_SESS_NULL );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.USER, false );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.ROLE, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.USER, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.ROLE, false );
         setEntitySession(CLS_NM, methodName, session);
         return session.getRoles();
     }
@@ -182,11 +182,11 @@ public class AccessMgrImpl extends Manageable implements AccessMgr, Serializable
     {
         String methodName = "authorizedRoles";
         assertContext( CLS_NM, methodName, session, GlobalErrIds.USER_SESS_NULL );
-        VUtil.assertNotNull( session.getUser(), GlobalErrIds.USER_NULL, CLS_NM + ".authorizedRoles" );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.USER, false );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.ROLE, false );
+        VUtil.getInstance().assertNotNull( session.getUser(), GlobalErrIds.USER_NULL, CLS_NM + ".authorizedRoles" );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.USER, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.ROLE, false );
         setEntitySession(CLS_NM, methodName, session);
-        return RoleUtil.getInheritedRoles( session.getRoles(), this.contextId );
+        return RoleUtil.getInstance().getInheritedRoles( session.getRoles(), this.contextId );
     }
 
 
@@ -225,13 +225,13 @@ public class AccessMgrImpl extends Manageable implements AccessMgr, Serializable
         }
 
         // validate Dynamic Separation of Duty Relations:
-        SDUtil.validateDSD( session, role );
+        SDUtil.getInstance().validateDSD( session, role );
 
         // set the role to the session:
         session.setRole( uRoles.get( indx ) );
 
         // Check role temporal constraints & DSD:
-        VUtil.validateConstraints( session, VUtil.ConstraintType.ROLE, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.ROLE, false );
     }
 
 
@@ -247,7 +247,7 @@ public class AccessMgrImpl extends Manageable implements AccessMgr, Serializable
         assertContext( CLS_NM, methodName, role, GlobalErrIds.ROLE_NULL );
         role.setUserId( session.getUserId() );
         List<UserRole> roles = session.getRoles();
-        VUtil
+        VUtil.getInstance()
             .assertNotNull( roles, GlobalErrIds.URLE_DEACTIVE_FAILED, CLS_NM + getFullMethodName( CLS_NM, methodName ) );
         int indx = roles.indexOf( role );
         if ( indx != -1 )

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
index 2326d2b..e58242a 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
@@ -254,7 +254,7 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         String methodName = "deleteRole";
         assertContext( CLS_NM, methodName, role, GlobalErrIds.ROLE_NULL );
         setEntitySession( CLS_NM, methodName, role );
-        int numChildren = RoleUtil.numChildren( role.getName(), role.getContextId() );
+        int numChildren = RoleUtil.getInstance().numChildren( role.getName(), role.getContextId() );
         if ( numChildren > 0 )
         {
             String error =  methodName + " role [" + role.getName() + "] must remove [" + numChildren +
@@ -275,12 +275,12 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         }
         permP.remove( role );
         // remove all parent relationships from the role graph:
-        Set<String> parents = RoleUtil.getParents( role.getName(), this.contextId );
+        Set<String> parents = RoleUtil.getInstance().getParents( role.getName(), this.contextId );
         if ( parents != null )
         {
             for ( String parent : parents )
             {
-                RoleUtil.updateHier( this.contextId, new Relationship( role.getName().toUpperCase(),
+                RoleUtil.getInstance().updateHier( this.contextId, new Relationship( role.getName().toUpperCase(),
                     parent.toUpperCase() ), Hier.Op.REM );
             }
         }
@@ -315,7 +315,7 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         user.setContextId( contextId );
         setEntitySession( CLS_NM, methodName, uRole );
         AdminUtil.canAssign( uRole.getAdminSession(), user, role, contextId );
-        SDUtil.validateSSD( user, role );
+        SDUtil.getInstance().validateSSD( user, role );
 
         // Get the default constraints from role:
         role.setContextId( this.contextId );
@@ -520,10 +520,10 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         Role role = new Role( parentRole.getName() );
         role.setContextId( this.contextId );
         roleP.read( role );
-        RoleUtil.validateRelationship( childRole, parentRole, false );
+        RoleUtil.getInstance().validateRelationship( childRole, parentRole, false );
         childRole.setParent( parentRole.getName() );
         roleP.add( childRole );
-        RoleUtil.updateHier( this.contextId, new Relationship( childRole.getName().toUpperCase(),
+        RoleUtil.getInstance().updateHier( this.contextId, new Relationship( childRole.getName().toUpperCase(),
             parentRole.getName().toUpperCase() ), Hier.Op.ADD );
     }
 
@@ -543,7 +543,7 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         role.setContextId( this.contextId );
         role = roleP.read( role );
         role.setContextId( this.contextId );
-        RoleUtil.validateRelationship( childRole, parentRole, false );
+        RoleUtil.getInstance().validateRelationship( childRole, parentRole, false );
         roleP.add( parentRole );
         // Use cRole2 to update ONLY the parents attribute on the child role and nothing else:
         Role cRole2 = new Role( childRole.getName() );
@@ -552,7 +552,7 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         cRole2.setContextId( this.contextId );
         setAdminData( CLS_NM, methodName, cRole2 );
         roleP.update( cRole2 );
-        RoleUtil.updateHier( this.contextId, new Relationship( childRole.getName().toUpperCase(),
+        RoleUtil.getInstance().updateHier( this.contextId, new Relationship( childRole.getName().toUpperCase(),
             parentRole.getName().toUpperCase() ), Hier.Op.ADD );
     }
 
@@ -575,8 +575,8 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         Role cRole = new Role( childRole.getName() );
         cRole.setContextId( this.contextId );
         cRole = roleP.read( cRole );
-        RoleUtil.validateRelationship( childRole, parentRole, false );
-        RoleUtil.updateHier( this.contextId, new Relationship( childRole.getName().toUpperCase(),
+        RoleUtil.getInstance().validateRelationship( childRole, parentRole, false );
+        RoleUtil.getInstance().updateHier( this.contextId, new Relationship( childRole.getName().toUpperCase(),
             parentRole.getName().toUpperCase() ), Hier.Op.ADD );
         // Use cRole2 to update ONLY the parents attribute on the child role and nothing else:
         Role cRole2 = new Role( childRole.getName() );
@@ -598,8 +598,8 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         assertContext( CLS_NM, methodName, parentRole, GlobalErrIds.PARENT_ROLE_NULL );
         setEntitySession( CLS_NM, methodName, parentRole );
         assertContext( CLS_NM, methodName, childRole, GlobalErrIds.CHILD_ROLE_NULL );
-        RoleUtil.validateRelationship( childRole, parentRole, true );
-        RoleUtil.updateHier( this.contextId, new Relationship( childRole.getName().toUpperCase(),
+        RoleUtil.getInstance().validateRelationship( childRole, parentRole, true );
+        RoleUtil.getInstance().updateHier( this.contextId, new Relationship( childRole.getName().toUpperCase(),
             parentRole.getName().toUpperCase() ), Hier.Op.REM );
         // need to remove the parent from the child role:
         Role cRole = new Role( childRole.getName() );
@@ -735,7 +735,7 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
         {
             for ( String roleName : ssdSet.getMembers() )
             {
-                SDUtil.clearSsdCacheEntry( roleName, contextId );
+                SDUtil.getInstance().clearSsdCacheEntry( roleName, contextId );
             }
         }
     }
@@ -749,7 +749,7 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
      */
     private void clearSSDCache( Role role )
     {
-        SDUtil.clearSsdCacheEntry( role.getName(), contextId );
+        SDUtil.getInstance().clearSsdCacheEntry( role.getName(), contextId );
     }
 
 
@@ -892,6 +892,6 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr, Serializ
      */
     private void clearDSDCache( SDSet dsdSet )
     {
-        SDUtil.clearDsdCacheEntry( dsdSet.getName(), contextId );
+        SDUtil.getInstance().clearDsdCacheEntry( dsdSet.getName(), contextId );
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/AdminRoleP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/AdminRoleP.java b/src/main/java/org/apache/directory/fortress/core/impl/AdminRoleP.java
index 8a16107..e6e0008 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/AdminRoleP.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AdminRoleP.java
@@ -25,21 +25,20 @@ import java.util.Set;
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
+import org.apache.directory.fortress.core.FinderException;
+import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.fortress.core.GlobalIds;
+import org.apache.directory.fortress.core.RemoveException;
+import org.apache.directory.fortress.core.SecurityException;
 import org.apache.directory.fortress.core.model.AdminRole;
 import org.apache.directory.fortress.core.model.ConstraintValidator;
 import org.apache.directory.fortress.core.model.Graphable;
 import org.apache.directory.fortress.core.model.OrgUnit;
 import org.apache.directory.fortress.core.model.UserAdminRole;
+import org.apache.directory.fortress.core.util.VUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.directory.fortress.core.FinderException;
-import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.fortress.core.GlobalIds;
-import org.apache.directory.fortress.core.RemoveException;
-import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.util.VUtil;
-
 
 /**
  * Process module for the AdminRole entity.  This class performs data validations and error mapping.  It is typically called
@@ -326,7 +325,7 @@ public final class AdminRoleP
                 LOG.warn( error );
                 throw new SecurityException( GlobalErrIds.ARLE_INVLD_RANGE_INCLUSIVE, error );
             }
-            else if ( !RoleUtil.isParent( entity.getBeginRange(), entity.getEndRange(), entity.getContextId() )
+            else if ( !RoleUtil.getInstance().isParent( entity.getBeginRange(), entity.getEndRange(), entity.getContextId() )
                 && !entity.getBeginRange().equalsIgnoreCase( entity.getEndRange() ) )
             {
                 String error = "validate invalid range detected for role name [" + entity.getName()

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/AuditDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/AuditDAO.java b/src/main/java/org/apache/directory/fortress/core/impl/AuditDAO.java
index 58a952c..4ce23fe 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/AuditDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AuditDAO.java
@@ -31,19 +31,19 @@ import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.api.ldap.model.message.SearchScope;
+import org.apache.directory.fortress.core.FinderException;
+import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.fortress.core.GlobalIds;
+import org.apache.directory.fortress.core.ldap.LdapDataProvider;
 import org.apache.directory.fortress.core.model.AuthZ;
 import org.apache.directory.fortress.core.model.Bind;
 import org.apache.directory.fortress.core.model.Mod;
+import org.apache.directory.fortress.core.model.ObjectFactory;
 import org.apache.directory.fortress.core.model.UserAudit;
 import org.apache.directory.fortress.core.util.AuditUtil;
+import org.apache.directory.fortress.core.util.Config;
 import org.apache.directory.fortress.core.util.time.TUtil;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.fortress.core.FinderException;
-import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.fortress.core.GlobalIds;
-import org.apache.directory.fortress.core.model.ObjectFactory;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.ldap.LdapDataProvider;
 
 
 /**
@@ -181,6 +181,9 @@ final class AuditDAO extends LdapDataProvider
             OBJECTCLASS, REQUAUTHZID, REQDN, REQEND, REQRESULT, REQSESSION, REQSTART, REQTYPE, REQMOD
     };
 
+    public AuditDAO(){
+        super();
+    }
 
     /**
      * This method returns failed authentications where the userid is not present in the directory.  This
@@ -225,8 +228,8 @@ final class AuditDAO extends LdapDataProvider
     {
         List<AuthZ> auditList = new ArrayList<>();
         LdapConnection ld = null;
-        String auditRoot = Config.getProperty( AUDIT_ROOT );
-        String userRoot = Config.getProperty( GlobalIds.USER_ROOT );
+        String auditRoot = Config.getInstance().getProperty( AUDIT_ROOT );
+        String userRoot = Config.getInstance().getProperty( GlobalIds.USER_ROOT );
 
         try
         {
@@ -246,13 +249,13 @@ final class AuditDAO extends LdapDataProvider
             {
                 userId = audit.getUserId();
                 filter += REQDN + "=" + SchemaConstants.UID_AT + "=" + userId + "," + userRoot + ")(" +
-                    REQUAUTHZID + "=" + "cn=Manager," + Config.getProperty( GlobalIds.SUFFIX ) + ")";
+                    REQUAUTHZID + "=" + "cn=Manager," + Config.getInstance().getProperty( GlobalIds.SUFFIX ) + ")";
             }
             else
             {
                 // pull back all failed authN attempts for all users:
                 filter += REQATTR + "=" + SchemaConstants.UID_AT + ")(" +
-                    REQUAUTHZID + "=" + "cn=Manager," + Config.getProperty( GlobalIds.SUFFIX ) + ")";
+                    REQUAUTHZID + "=" + "cn=Manager," + Config.getInstance().getProperty( GlobalIds.SUFFIX ) + ")";
             }
 
             if ( audit.isFailedOnly() )
@@ -314,7 +317,7 @@ final class AuditDAO extends LdapDataProvider
     {
         List<AuthZ> auditList = new ArrayList<>();
         LdapConnection ld = null;
-        String auditRoot = Config.getProperty( AUDIT_ROOT );
+        String auditRoot = Config.getInstance().getProperty( AUDIT_ROOT );
         String permRoot = getRootDn( audit.isAdmin(), audit.getContextId() );
         String userRoot = getRootDn( audit.getContextId(), GlobalIds.USER_ROOT );
 
@@ -396,7 +399,7 @@ final class AuditDAO extends LdapDataProvider
     {
         List<AuthZ> auditList = new ArrayList<>();
         LdapConnection ld = null;
-        String auditRoot = Config.getProperty( AUDIT_ROOT );
+        String auditRoot = Config.getInstance().getProperty( AUDIT_ROOT );
         String userRoot = getRootDn( audit.getContextId(), GlobalIds.USER_ROOT );
 
         try
@@ -411,7 +414,7 @@ final class AuditDAO extends LdapDataProvider
             {
                 // have to limit the query to only authorization entries.
                 // TODO: determine why the cn=Manager user is showing up in this search:
-                filter += REQUAUTHZID + "=*)(!(" + REQUAUTHZID + "=cn=Manager," + Config.getProperty( GlobalIds.SUFFIX )
+                filter += REQUAUTHZID + "=*)(!(" + REQUAUTHZID + "=cn=Manager," + Config.getInstance().getProperty( GlobalIds.SUFFIX )
                     + "))";
 
                 // TODO: fix this so filter by only the Fortress AuthZ entries and not the others:
@@ -469,7 +472,7 @@ final class AuditDAO extends LdapDataProvider
     {
         List<Bind> auditList = new ArrayList<>();
         LdapConnection ld = null;
-        String auditRoot = Config.getProperty( AUDIT_ROOT );
+        String auditRoot = Config.getInstance().getProperty( AUDIT_ROOT );
         String userRoot = getRootDn( audit.getContextId(), GlobalIds.USER_ROOT );
 
         try
@@ -552,7 +555,7 @@ final class AuditDAO extends LdapDataProvider
     {
         List<Mod> modList = new ArrayList<>();
         LdapConnection ld = null;
-        String auditRoot = Config.getProperty( AUDIT_ROOT );
+        String auditRoot = Config.getInstance().getProperty( AUDIT_ROOT );
 
         String userRoot = getRootDn( audit.getContextId(), GlobalIds.USER_ROOT );
 
@@ -607,7 +610,7 @@ final class AuditDAO extends LdapDataProvider
     {
         List<Mod> modList = new ArrayList<>();
         LdapConnection ld = null;
-        String auditRoot = Config.getProperty( AUDIT_ROOT );
+        String auditRoot = Config.getInstance().getProperty( AUDIT_ROOT );
 
         try
         {

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/AuditP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/AuditP.java b/src/main/java/org/apache/directory/fortress/core/impl/AuditP.java
index ca6960e..1d9b870 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/AuditP.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AuditP.java
@@ -50,7 +50,7 @@ import org.apache.directory.fortress.core.model.UserAudit;
  */
 public final class AuditP
 {
-    private static final AuditDAO aDao = new AuditDAO();
+    private AuditDAO aDao;
 
 
     /**
@@ -58,6 +58,7 @@ public final class AuditP
      */
     AuditP()
     {
+        aDao = new AuditDAO();
     }
 
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/ConfigDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/ConfigDAO.java b/src/main/java/org/apache/directory/fortress/core/impl/ConfigDAO.java
index a3f7a9b..b2278b4 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/ConfigDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/ConfigDAO.java
@@ -32,17 +32,17 @@ import org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsExcep
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.exception.LdapNoSuchObjectException;
 import org.apache.directory.fortress.core.CreateException;
-import org.apache.directory.fortress.core.util.Config;
-import org.apache.directory.fortress.core.model.PropUtil;
-import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.fortress.core.ldap.LdapDataProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.directory.fortress.core.FinderException;
 import org.apache.directory.fortress.core.GlobalErrIds;
 import org.apache.directory.fortress.core.GlobalIds;
 import org.apache.directory.fortress.core.RemoveException;
 import org.apache.directory.fortress.core.UpdateException;
+import org.apache.directory.fortress.core.ldap.LdapDataProvider;
+import org.apache.directory.fortress.core.model.PropUtil;
+import org.apache.directory.fortress.core.util.Config;
+import org.apache.directory.ldap.client.api.LdapConnection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -84,7 +84,7 @@ final class ConfigDAO extends LdapDataProvider
 {
     private static final String CLS_NM = ConfigDAO.class.getName();
     private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
-    private static final String CONFIG_ROOT_DN = Config.getProperty( GlobalIds.CONFIG_ROOT_PARAM );
+    private String CONFIG_ROOT_DN;
 
     private static final String CONFIG_OBJ_CLASS[] =
         {
@@ -102,6 +102,9 @@ final class ConfigDAO extends LdapDataProvider
      */
     ConfigDAO()
     {
+    	super();
+    	
+    	CONFIG_ROOT_DN = Config.getInstance().getProperty( GlobalIds.CONFIG_ROOT_PARAM );
     }
 
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/DSDChecker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/DSDChecker.java b/src/main/java/org/apache/directory/fortress/core/impl/DSDChecker.java
index ee00c3d..8a47857 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/DSDChecker.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/DSDChecker.java
@@ -24,18 +24,18 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.fortress.core.GlobalErrIds;
+import org.apache.directory.fortress.core.model.Constraint;
+import org.apache.directory.fortress.core.model.ObjectFactory;
 import org.apache.directory.fortress.core.model.SDSet;
 import org.apache.directory.fortress.core.model.Session;
 import org.apache.directory.fortress.core.model.UserRole;
 import org.apache.directory.fortress.core.model.Warning;
 import org.apache.directory.fortress.core.util.VUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.directory.fortress.core.GlobalErrIds;
-import org.apache.directory.fortress.core.model.ObjectFactory;
-import org.apache.directory.fortress.core.model.Constraint;
 import org.apache.directory.fortress.core.util.time.Time;
 import org.apache.directory.fortress.core.util.time.Validator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -89,13 +89,13 @@ public class DSDChecker
             return rc;
         }
         // get the list of authorized roles for this user:
-        Set<String> authorizedRoleSet = RoleUtil.getInheritedRoles( activeRoleList, session.getUser().getContextId() );
+        Set<String> authorizedRoleSet = RoleUtil.getInstance().getInheritedRoles( activeRoleList, session.getUser().getContextId() );
         // only need to check DSD constraints if more than one role is being activated:
         if ( authorizedRoleSet != null && authorizedRoleSet.size() > 1 )
         {
             // get all DSD sets that contain the candidate activated and authorized roles,
             //If DSD cache is disabled, this will search the directory using authorizedRoleSet
-            Set<SDSet> dsdSets = SDUtil.getDsdCache( authorizedRoleSet, session.getUser().getContextId() );
+            Set<SDSet> dsdSets = SDUtil.getInstance().getDsdCache( authorizedRoleSet, session.getUser().getContextId() );
             if ( dsdSets != null && dsdSets.size() > 0 )
             {
                 for ( SDSet dsd : dsdSets )
@@ -127,7 +127,7 @@ public class DSDChecker
                         }
                         else
                         {
-                            Set<String> parentSet = RoleUtil.getAscendants( activatedRole.getName(), session.getUser()
+                            Set<String> parentSet = RoleUtil.getInstance().getAscendants( activatedRole.getName(), session.getUser()
                                 .getContextId() );
                             // now check for every role inherited from this activated role:
                             for ( String parentRole : parentSet )

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/DelAccessMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/DelAccessMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/DelAccessMgrImpl.java
index 6f9484c..e874e7a 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/DelAccessMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/DelAccessMgrImpl.java
@@ -65,11 +65,17 @@ import org.apache.directory.fortress.core.util.VUtil;
  */
 public class DelAccessMgrImpl extends AccessMgrImpl implements DelAccessMgr, Serializable
 {
-    private static final String CLS_NM = DelAccessMgrImpl.class.getName();
-    private static final UserP userP = new UserP();
-    private static final PermP permP = new PermP();
-    private static final String SUPER_ADMIN = Config.getProperty("superadmin.role", "fortress-core-super-admin");
+    private  final String CLS_NM = DelAccessMgrImpl.class.getName();
+    private UserP userP;
+    private PermP permP;
+    private String SUPER_ADMIN;
 
+    public DelAccessMgrImpl() {    	
+        userP = new UserP();
+        permP = new PermP();
+        SUPER_ADMIN = Config.getInstance().getProperty("superadmin.role", "fortress-core-super-admin");
+	}
+    
     /**
      * {@inheritDoc}
      */
@@ -172,7 +178,7 @@ public class DelAccessMgrImpl extends AccessMgrImpl implements DelAccessMgr, Ser
             String info = getFullMethodName(CLS_NM, methodName) + " Admin Role [" + role.getName() + "] User [" + session.getUserId() + "] adminRole not authorized for user.";
             throw new SecurityException(GlobalErrIds.ARLE_ACTIVATE_FAILED, info);
         }
-        SDUtil.validateDSD( session, role );
+        SDUtil.getInstance().validateDSD( session, role );
 
         // now activate the role to the session:
         session.setRole(uRoles.get(indx));
@@ -239,8 +245,8 @@ public class DelAccessMgrImpl extends AccessMgrImpl implements DelAccessMgr, Ser
     {
         String methodName = "sessionPermissions";
         assertContext(CLS_NM, methodName, session, GlobalErrIds.USER_SESS_NULL);
-        VUtil.validateConstraints( session, VUtil.ConstraintType.USER, false );
-        VUtil.validateConstraints( session, VUtil.ConstraintType.ROLE, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.USER, false );
+        VUtil.getInstance().validateConstraints( session, VUtil.ConstraintType.ROLE, false );
         setEntitySession(CLS_NM, methodName, session);
         return permP.search( session, true );
     }
@@ -278,7 +284,7 @@ public class DelAccessMgrImpl extends AccessMgrImpl implements DelAccessMgr, Ser
                     {
                         // Add osU children to the set:
                         osUsFinal.add(osU);
-                        Set<String> children = UsoUtil.getDescendants( osU, this.contextId );
+                        Set<String> children = UsoUtil.getInstance().getDescendants( osU, this.contextId );
                         osUsFinal.addAll(children);
                     }
                     // does the admin role have authority over the user object?
@@ -288,7 +294,7 @@ public class DelAccessMgrImpl extends AccessMgrImpl implements DelAccessMgr, Ser
                         Set<String> range;
                         if(uaRole.getBeginRange() != null && uaRole.getEndRange() != null && !uaRole.getBeginRange().equalsIgnoreCase(uaRole.getEndRange()))
                         {
-                            range = RoleUtil.getAscendants( uaRole.getBeginRange(), uaRole.getEndRange(),
+                            range = RoleUtil.getInstance().getAscendants( uaRole.getBeginRange(), uaRole.getEndRange(),
                                 uaRole.isEndInclusive(), this.contextId );
                             if(uaRole.isBeginInclusive())
                             {
@@ -352,7 +358,7 @@ public class DelAccessMgrImpl extends AccessMgrImpl implements DelAccessMgr, Ser
                     {
                         // Add osU children to the set:
                         osPsFinal.add(osP);
-                        Set<String> children = PsoUtil.getDescendants( osP, this.contextId );
+                        Set<String> children = PsoUtil.getInstance().getDescendants( osP, this.contextId );
                         osPsFinal.addAll(children);
                     }
                     // does the admin role have authority over the perm object?
@@ -362,7 +368,7 @@ public class DelAccessMgrImpl extends AccessMgrImpl implements DelAccessMgr, Ser
                         Set<String> range;
                         if(uaRole.getBeginRange() != null && uaRole.getEndRange() != null && !uaRole.getBeginRange().equalsIgnoreCase(uaRole.getEndRange()))
                         {
-                            range = RoleUtil.getAscendants(uaRole.getBeginRange(), uaRole.getEndRange(), uaRole.isEndInclusive(), this.contextId);
+                            range = RoleUtil.getInstance().getAscendants(uaRole.getBeginRange(), uaRole.getEndRange(), uaRole.isEndInclusive(), this.contextId);
                             if(uaRole.isBeginInclusive())
                             {
                                 range.add(uaRole.getBeginRange());

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/DelAdminMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/DelAdminMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/DelAdminMgrImpl.java
index e7a3c79..ab8041a 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/DelAdminMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/DelAdminMgrImpl.java
@@ -63,11 +63,18 @@ import org.apache.directory.fortress.core.util.VUtil;
 public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Serializable
 {
     private static final String CLS_NM = DelAdminMgrImpl.class.getName();
-    private static final OrgUnitP ouP = new OrgUnitP();
-    private static final AdminRoleP admRP = new AdminRoleP();
-    private static final PermP permP = new PermP();
-    private static final UserP userP = new UserP();
-
+    private OrgUnitP ouP;
+    private AdminRoleP admRP;
+    private PermP permP;
+    private UserP userP;
+
+    public DelAdminMgrImpl() {
+        ouP = new OrgUnitP();
+        admRP = new AdminRoleP();
+        permP = new PermP();
+        userP = new UserP();
+	}
+    
     /**
      * {@inheritDoc}
      */
@@ -252,11 +259,11 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
         int numChildren;
         if (entity.getType() == OrgUnit.Type.USER)
         {
-            numChildren = UsoUtil.numChildren( entity.getName(), entity.getContextId() );
+            numChildren = UsoUtil.getInstance().numChildren( entity.getName(), entity.getContextId() );
         }
         else
         {
-            numChildren = PsoUtil.numChildren( entity.getName(), entity.getContextId() );
+            numChildren = PsoUtil.getInstance().numChildren( entity.getName(), entity.getContextId() );
         }
         if (numChildren > 0)
         {
@@ -288,11 +295,11 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
         Set<String> parents;
         if (entity.getType() == OrgUnit.Type.USER)
         {
-            parents = UsoUtil.getParents(entity.getName(), this.contextId);
+            parents = UsoUtil.getInstance().getParents(entity.getName(), this.contextId);
         }
         else
         {
-            parents = PsoUtil.getParents(entity.getName(), this.contextId);
+            parents = PsoUtil.getInstance().getParents(entity.getName(), this.contextId);
         }
         if(parents != null)
         {
@@ -300,11 +307,11 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
             {
                 if (entity.getType() == OrgUnit.Type.USER)
                 {
-                    UsoUtil.updateHier(this.contextId, new Relationship(entity.getName().toUpperCase(), parent.toUpperCase()), Hier.Op.REM);
+                    UsoUtil.getInstance().updateHier(this.contextId, new Relationship(entity.getName().toUpperCase(), parent.toUpperCase()), Hier.Op.REM);
                 }
                 else
                 {
-                    PsoUtil.updateHier(this.contextId, new Relationship(entity.getName().toUpperCase(), parent.toUpperCase()), Hier.Op.REM);
+                    PsoUtil.getInstance().updateHier(this.contextId, new Relationship(entity.getName().toUpperCase(), parent.toUpperCase()), Hier.Op.REM);
                 }
             }
         }
@@ -330,21 +337,21 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
         ouP.read(parent);
         if (parent.getType() == OrgUnit.Type.USER)
         {
-            UsoUtil.validateRelationship(child, parent, false);
+            UsoUtil.getInstance().validateRelationship(child, parent, false);
         }
         else
         {
-            PsoUtil.validateRelationship(child, parent, false);
+            PsoUtil.getInstance().validateRelationship(child, parent, false);
         }
         child.setParent(parent.getName());
         ouP.add(child);
         if (parent.getType() == OrgUnit.Type.USER)
         {
-            UsoUtil.updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
+            UsoUtil.getInstance().updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
         }
         else
         {
-            PsoUtil.updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
+            PsoUtil.getInstance().updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
         }
     }
 
@@ -365,11 +372,11 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
         OrgUnit newChild = ouP.read(child);
         if (parent.getType() == OrgUnit.Type.USER)
         {
-            UsoUtil.validateRelationship(child, parent, false);
+            UsoUtil.getInstance().validateRelationship(child, parent, false);
         }
         else
         {
-            PsoUtil.validateRelationship(child, parent, false);
+            PsoUtil.getInstance().validateRelationship(child, parent, false);
         }
         ouP.add(parent);
         newChild.setParent(parent.getName());
@@ -377,11 +384,11 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
         ouP.update(newChild);
         if (parent.getType() == OrgUnit.Type.USER)
         {
-            UsoUtil.updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
+            UsoUtil.getInstance().updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
         }
         else
         {
-            PsoUtil.updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
+            PsoUtil.getInstance().updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
         }
     }
 
@@ -399,11 +406,11 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
         setEntitySession(CLS_NM, methodName, parent);
         if (parent.getType() == OrgUnit.Type.USER)
         {
-            UsoUtil.validateRelationship(child, parent, false);
+            UsoUtil.getInstance().validateRelationship(child, parent, false);
         }
         else
         {
-            PsoUtil.validateRelationship(child, parent, false);
+            PsoUtil.getInstance().validateRelationship(child, parent, false);
         }
         // validate that both orgs are present:
         ouP.read(parent);
@@ -416,11 +423,11 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
         // we're still good, now set the hierarchical relationship:
         if (parent.getType() == OrgUnit.Type.USER)
         {
-            UsoUtil.updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
+            UsoUtil.getInstance().updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
         }
         else
         {
-            PsoUtil.updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
+            PsoUtil.getInstance().updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.ADD);
         }
     }
 
@@ -438,19 +445,19 @@ public final class DelAdminMgrImpl extends Manageable implements DelAdminMgr, Se
         setEntitySession(CLS_NM, methodName, parent);
         if (parent.getType() == OrgUnit.Type.USER)
         {
-            UsoUtil.validateRelationship(child, parent, true);
+            UsoUtil.getInstance().validateRelationship(child, parent, true);
         }
         else
         {
-            PsoUtil.validateRelationship(child, parent, true);
+            PsoUtil.getInstance().validateRelationship(child, parent, true);
         }
         if (parent.getType() == OrgUnit.Type.USER)
         {
-            UsoUtil.updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.REM);
+            UsoUtil.getInstance().updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.REM);
         }
         else
         {
-            PsoUtil.updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.REM);
+            PsoUtil.getInstance().updateHier(this.contextId, new Relationship(child.getName().toUpperCase(), parent.getName().toUpperCase()), Hier.Op.REM);
         }
         OrgUnit cOrg = ouP.read(child);
         cOrg.setContextId(this.contextId);

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/908a0734/src/main/java/org/apache/directory/fortress/core/impl/DelReviewMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/DelReviewMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/DelReviewMgrImpl.java
index 77c3676..aa8bf72 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/DelReviewMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/DelReviewMgrImpl.java
@@ -55,11 +55,18 @@ import org.apache.directory.fortress.core.util.VUtil;
 public class DelReviewMgrImpl extends Manageable implements DelReviewMgr, Serializable
 {
     private static final String CLS_NM = DelReviewMgrImpl.class.getName();
-    private static final UserP userP = new UserP();
-    private static final OrgUnitP ouP = new OrgUnitP();
-    private static final AdminRoleP admRP = new AdminRoleP();
-    private static final PermP permP = new PermP();
-
+    private UserP userP;
+    private OrgUnitP ouP;
+    private AdminRoleP admRP;
+    private PermP permP;
+
+    public DelReviewMgrImpl() {
+        userP = new UserP();
+        ouP = new OrgUnitP();
+        admRP = new AdminRoleP();
+        permP = new PermP();
+	}
+    
     /**
      * {@inheritDoc}
      */


Mime
View raw message