[jboss-cvs] JBossAS SVN: r61584 - branches/Branch_4_0/varia/src/main/org/jboss/jmx/adaptor/html.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 22 11:21:53 EDT 2007


Author: darran.lofthouse at jboss.com
Date: 2007-03-22 11:21:52 -0400 (Thu, 22 Mar 2007)
New Revision: 61584

Modified:
   branches/Branch_4_0/varia/src/main/org/jboss/jmx/adaptor/html/JMXOpsAccessControlFilter.java
Log:
JBAS-4231 - Make JMXOpsAccessControlFilter thread safe.

Modified: branches/Branch_4_0/varia/src/main/org/jboss/jmx/adaptor/html/JMXOpsAccessControlFilter.java
===================================================================
--- branches/Branch_4_0/varia/src/main/org/jboss/jmx/adaptor/html/JMXOpsAccessControlFilter.java	2007-03-22 15:12:42 UTC (rev 61583)
+++ branches/Branch_4_0/varia/src/main/org/jboss/jmx/adaptor/html/JMXOpsAccessControlFilter.java	2007-03-22 15:21:52 UTC (rev 61584)
@@ -74,10 +74,8 @@
    private List updateAttributesRoles = null;
    private List invokeOpRoles = null; 
    //Rare usecase
-   private List invokeMBeanRoles = null;
+   private List invokeMBeanRoles = null;   
    
-   private ArrayList subjectRoles = null;
-   
    //An authorization delegate that the user can plug in which can do the
    //authorization decisions - when deeper access control usecases arise
    //The Authorization Delegate should have a method
@@ -115,8 +113,7 @@
                    FilterChain chain) 
    throws IOException, ServletException
    {  
-      boolean passThrough = true;
-      subjectRoles = getSubjectRoles();
+      boolean passThrough = true;      
       
       String action = request.getParameter(ACTION_PARAM);
 
@@ -162,8 +159,10 @@
       if(listToCheck == null || listToCheck.size() == 0)
          return true;
       
+      ArrayList subjectRoles = getSubjectRoles();
+      
       boolean result = false;
-      int len = this.subjectRoles.size();
+      int len = subjectRoles.size();
       for(int i = 0; i < len; i++)
       {
          String subjectRole = (String)subjectRoles.get(i);




More information about the jboss-cvs-commits mailing list