geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r154694 - geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
Date Mon, 21 Feb 2005 17:02:24 GMT
Author: jgenender
Date: Mon Feb 21 09:02:22 2005
New Revision: 154694

URL: http://svn.apache.org/viewcvs?view=rev&rev=154694
Log:
Checks if javax.security.jacc.policy.provider is set.  If so it overrides the policyProvider.

Modified:
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java?view=diff&r1=154693&r2=154694
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
Mon Feb 21 09:02:22 2005
@@ -59,14 +59,22 @@
             System.setProperty("javax.security.jacc.PolicyConfigurationFactory.provider",
policyConfigurationFactory);
         }
 
-        PolicyConfigurationFactory.getPolicyConfigurationFactory();
+        /**
+         * javax.security.jacc.policy.provider get preference over policyProvider
+         */
+        String sysProvider = System.getProperty("javax.security.jacc.policy.provider");
+        if (sysProvider != null)
+            policyProvider = sysProvider;
 
         if (policyProvider != null) {
+            System.setProperty("javax.security.jacc.policy.provider", policyProvider);
             Policy customPolicy = (Policy) classLoader.loadClass(policyProvider).newInstance();
             Policy.setPolicy(customPolicy);
         } else {
             Policy.setPolicy(new GeronimoPolicy());
         }
+
+        PolicyConfigurationFactory.getPolicyConfigurationFactory();
 
         log.info("JACC factory registered");
     }



Mime
View raw message