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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 26 12:52:52 EDT 2007


Author: darran.lofthouse at jboss.com
Date: 2007-03-26 12:52:52 -0400 (Mon, 26 Mar 2007)
New Revision: 61705

Modified:
   branches/JBoss_4_0_5_GA_CP/varia/src/main/org/jboss/jmx/adaptor/html/JMXOpsAccessControlFilter.java
Log:
ASPATCH-175 JMXOpsAccessControlFilter is Not Thread Safe.

Modified: branches/JBoss_4_0_5_GA_CP/varia/src/main/org/jboss/jmx/adaptor/html/JMXOpsAccessControlFilter.java
===================================================================
--- branches/JBoss_4_0_5_GA_CP/varia/src/main/org/jboss/jmx/adaptor/html/JMXOpsAccessControlFilter.java	2007-03-26 16:24:54 UTC (rev 61704)
+++ branches/JBoss_4_0_5_GA_CP/varia/src/main/org/jboss/jmx/adaptor/html/JMXOpsAccessControlFilter.java	2007-03-26 16:52:52 UTC (rev 61705)
@@ -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