Author: rmannibucau
Date: Tue Oct  7 13:50:44 2014
New Revision: 1629893

URL: http://svn.apache.org/r1629893
Log:
TOMEE-1265 ensure PolicyContext is loaded when hitting BasicJaccProvider

Modified:
    
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java

Modified: 
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java
URL: 
http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java?rev=1629893&r1=1629892&r2=1629893&view=diff
==============================================================================
--- 
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java
 (original)
+++ 
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java
 Tue Oct  7 13:50:44 2014
@@ -33,6 +33,14 @@ import java.util.Map;
  * @version $Rev$ $Date$
  */
 public class BasicJaccProvider extends JaccProvider {
+    static {
+        // force preloading to avoid to loop under SecurityManager
+        try {
+            Class.forName(PolicyContext.class.getName());
+        } catch (final ClassNotFoundException e) {
+            // no-op
+        }
+    }
 
     private final Map<String, BasicPolicyConfiguration> configurations = new 
HashMap<String, BasicPolicyConfiguration>();
 


Reply via email to