[jboss-cvs] JBoss Messaging SVN: r3808 - in trunk: src/main/org/jboss/messaging/core/security and 7 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 27 05:37:40 EST 2008


Author: ataylor
Date: 2008-02-27 05:37:40 -0500 (Wed, 27 Feb 2008)
New Revision: 3808

Added:
   trunk/src/main/org/jboss/messaging/core/settings/HierarchicalRepositoryChangeListener.java
Modified:
   trunk/docs/examples/embedded/src/org/jboss/example/embedded/EmbeddedExample.java
   trunk/src/main/org/jboss/messaging/core/security/SecurityStore.java
   trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java
   trunk/src/main/org/jboss/messaging/core/server/Configuration.java
   trunk/src/main/org/jboss/messaging/core/settings/HierarchicalRepository.java
   trunk/src/main/org/jboss/messaging/core/settings/impl/HierarchicalObjectRepository.java
   trunk/src/main/org/jboss/messaging/core/settings/impl/QueueSettings.java
   trunk/tests/src/org/jboss/messaging/core/deployers/impl/test/unit/QueueSettingsDeployerTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/SecurityTest.java
   trunk/tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
   trunk/tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java
   trunk/tests/src/org/jboss/test/messaging/tools/container/Server.java
Log:
security changes, added method to HierarchicalRepositry to allow registration of listeners

Modified: trunk/docs/examples/embedded/src/org/jboss/example/embedded/EmbeddedExample.java
===================================================================
--- trunk/docs/examples/embedded/src/org/jboss/example/embedded/EmbeddedExample.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/docs/examples/embedded/src/org/jboss/example/embedded/EmbeddedExample.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -23,17 +23,14 @@
 
 import static org.jboss.messaging.core.remoting.TransportType.TCP;
 
-import org.jboss.messaging.core.client.ClientConnection;
-import org.jboss.messaging.core.client.ClientConnectionFactory;
-import org.jboss.messaging.core.client.ClientConsumer;
-import org.jboss.messaging.core.client.ClientProducer;
-import org.jboss.messaging.core.client.ClientSession;
+import org.jboss.messaging.core.client.*;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
 import org.jboss.messaging.core.remoting.impl.RemotingConfiguration;
 import org.jboss.messaging.core.server.Message;
 import org.jboss.messaging.core.server.MessagingServer;
 import org.jboss.messaging.core.server.impl.MessageImpl;
 import org.jboss.messaging.core.server.impl.MessagingServerImpl;
+import org.jboss.messaging.core.version.impl.VersionImpl;
 import org.jboss.messaging.jms.client.JBossTextMessage;
 
 /**
@@ -46,8 +43,8 @@
       RemotingConfiguration remotingConf = new RemotingConfiguration(TCP, "localhost", 5400);
       MessagingServer messagingServer = new MessagingServerImpl(remotingConf);
       messagingServer.start();
-      ClientConnectionFactory cf = new ClientConnectionFactoryImpl(remotingConf);
-      ClientConnection clientConnection = cf.createConnection(null, null);
+      ClientConnectionFactory cf = new ClientConnectionFactoryImpl(messagingServer.getConfiguration().getMessagingServerID(),
+              messagingServer.getConfiguration().getRemotingConfiguration(), messagingServer.getVersion(), messagingServer.getConfiguration().isStrictTck(), 500);ClientConnection clientConnection = cf.createConnection(null, null);
       ClientSession clientSession = clientConnection.createClientSession(false, true, true, 0, false);
       clientSession.createQueue("Queue1", "Queue1", null, false, false);
       ClientProducer clientProducer = clientSession.createProducer("Queue1");

Modified: trunk/src/main/org/jboss/messaging/core/security/SecurityStore.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/SecurityStore.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/src/main/org/jboss/messaging/core/security/SecurityStore.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -42,6 +42,4 @@
    void check(String address, CheckType checkType, ServerConnection conn) throws Exception;
 
    void setSecurityRepository(HierarchicalRepository<HashSet<Role>> securityRepository);
-   
-   void invalidateCache();
 }

Modified: trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -34,6 +34,7 @@
 import org.jboss.messaging.core.server.MessagingException;
 import org.jboss.messaging.core.server.ServerConnection;
 import org.jboss.messaging.core.settings.HierarchicalRepository;
+import org.jboss.messaging.core.settings.HierarchicalRepositoryChangeListener;
 import org.jboss.messaging.util.ConcurrentHashSet;
 import org.jboss.security.AuthenticationManager;
 import org.jboss.security.RealmMapping;
@@ -41,38 +42,38 @@
 
 /**
  * The JBM SecurityStore implementation
- * 
+ *
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- * 
+ *
  * Parts based on old version by:
- * 
+ *
  * @author Peter Antman
  * @author <a href="mailto:Scott.Stark at jboss.org">Scott Stark</a>
  * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * 
+ *
  * @version $Revision$
  *
  * $Id$
  */
-public class SecurityStoreImpl implements SecurityStore
+public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryChangeListener
 {
    // Constants -----------------------------------------------------
 
    private static final Logger log = Logger.getLogger(SecurityStoreImpl.class);
 
    // Static --------------------------------------------------------
-   
+
    // Attributes ----------------------------------------------------
 
    private boolean trace = log.isTraceEnabled();
-   
+
    private HierarchicalRepository<HashSet<Role>> securityRepository;
 
    private AuthenticationManager authenticationManager;
-   
+
    private RealmMapping realmMapping;
-   
+
    private final Set<String> readCache = new ConcurrentHashSet<String>();
 
    private final Set<String> writeCache = new ConcurrentHashSet<String>();
@@ -84,12 +85,12 @@
    private volatile long lastCheck;
 
    // Constructors --------------------------------------------------
-   
+
    public SecurityStoreImpl(long invalidationInterval)
    {
    	this.invalidationInterval = invalidationInterval;
    }
-   
+
    // SecurityManager implementation --------------------------------
 
    public Subject authenticate(String user, String password) throws Exception
@@ -97,9 +98,9 @@
       if (trace) { log.trace("authenticating user " + user); }
 
       SimplePrincipal principal = new SimplePrincipal(user);
-      
+
       char[] passwordChars = null;
-      
+
       if (password != null)
       {
          passwordChars = password.toCharArray();
@@ -114,7 +115,7 @@
          // Warning! This "taints" thread local. Make sure you pop it off the stack as soon as
          //          you're done with it.
          SecurityActions.pushSubjectContext(principal, passwordChars, subject);
-         
+
          return subject;
       }
       else
@@ -122,7 +123,7 @@
          throw new MessagingException(MessagingException.SECURITY_EXCEPTION, "User " + user + " is NOT authenticated");
       }
    }
-   
+
    public void check(String address, CheckType checkType, ServerConnection conn) throws Exception
    {
       if (trace) { log.trace("checking access permissions to " + address); }
@@ -161,7 +162,7 @@
       }
 
       // if we get here we're granted, add to the cache
-      
+
       switch (checkType.type)
       {
          case CheckType.TYPE_READ:
@@ -183,29 +184,35 @@
          {
             throw new IllegalArgumentException("Invalid checkType:" + checkType);
          }
-      }      
+      }
    }
-   
-   public void invalidateCache()
+
+   public void onChange()
    {
-   	readCache.clear();
+      invalidateCache();
+   }
 
+   private void invalidateCache()
+   {
+      readCache.clear();
+
       writeCache.clear();
 
       createCache.clear();
    }
-   
+
    // Public --------------------------------------------------------
 
    public void setSecurityRepository(HierarchicalRepository<HashSet<Role>> securityRepository)
    {
       this.securityRepository = securityRepository;
+      securityRepository.registerListener(this);
    }
-   
+
    public void setAuthenticationManager(AuthenticationManager authenticationManager)
    {
       this.authenticationManager = authenticationManager;
-      
+
       this.realmMapping = (RealmMapping) authenticationManager;
    }
 
@@ -214,7 +221,7 @@
    // Package Private -----------------------------------------------
 
    // Private -------------------------------------------------------
-   
+
    private boolean checkCached(String dest, CheckType checkType)
    {
       long now = System.currentTimeMillis();
@@ -255,7 +262,7 @@
 
       return granted;
    }
-   
+
    private boolean authorize(String user, String destination, CheckType checkType)
    {
       if (trace) { log.trace("authorizing user " + user + " for destination " + destination); }
@@ -263,9 +270,9 @@
       HashSet<Role> roles = securityRepository.getMatch(destination);
 
       Principal principal = user == null ? null : new SimplePrincipal(user);
-      
+
       Set rolePrincipals = getRolePrincipals(checkType, roles);
-      
+
       boolean hasRole = realmMapping.doesUserHaveRole(principal, rolePrincipals);
 
       if (trace) { log.trace("user " + user + (hasRole ? " is " : " is NOT ") + "authorized"); }
@@ -288,5 +295,5 @@
       return principals;
    }
 
-   // Inner class ---------------------------------------------------         
+   // Inner class ---------------------------------------------------
 }

Modified: trunk/src/main/org/jboss/messaging/core/server/Configuration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/Configuration.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/src/main/org/jboss/messaging/core/server/Configuration.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -125,7 +125,7 @@
          throw new IllegalArgumentException("Cannot set MessageCounterSamplePeriod < 1000 ms");
       }
       
-      propertyChangeSupport.firePropertyChange("messageCounterSamplePeriod", messageCounterSamplePeriod, messageCounterSamplePeriod);
+      propertyChangeSupport.firePropertyChange("messageCounterSamplePeriod", this.messageCounterSamplePeriod, messageCounterSamplePeriod);
       
       this.messageCounterSamplePeriod = messageCounterSamplePeriod;
    }

Modified: trunk/src/main/org/jboss/messaging/core/settings/HierarchicalRepository.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/settings/HierarchicalRepository.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/src/main/org/jboss/messaging/core/settings/HierarchicalRepository.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -1,6 +1,7 @@
 package org.jboss.messaging.core.settings;
 
 
+
 /**
  * allows objects to be mapped against a regex pattern and held in order in a list
  *
@@ -33,4 +34,17 @@
     * @param match the match to remove
     */
    void removeMatch(String match);
+
+
+   /**
+    * register a listener to listen for changes in the repository
+    * @param listener
+    */
+   void registerListener(HierarchicalRepositoryChangeListener listener);
+
+   /**
+    * unregister a listener
+    * @param listener
+    */
+   void unRegisterListener(HierarchicalRepositoryChangeListener listener);
 }

Added: trunk/src/main/org/jboss/messaging/core/settings/HierarchicalRepositoryChangeListener.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/settings/HierarchicalRepositoryChangeListener.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/settings/HierarchicalRepositoryChangeListener.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -0,0 +1,9 @@
+package org.jboss.messaging.core.settings;
+
+/**
+ * @author <a href="ataylor at redhat.com">Andy Taylor</a>
+ */
+public interface HierarchicalRepositoryChangeListener
+{
+   void onChange();
+}

Modified: trunk/src/main/org/jboss/messaging/core/settings/impl/HierarchicalObjectRepository.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/settings/impl/HierarchicalObjectRepository.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/src/main/org/jboss/messaging/core/settings/impl/HierarchicalObjectRepository.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -31,6 +31,8 @@
 
 import org.jboss.messaging.core.settings.HierarchicalRepository;
 import org.jboss.messaging.core.settings.Mergeable;
+import org.jboss.messaging.core.settings.HierarchicalRepositoryChangeListener;
+import org.jboss.messaging.core.logging.Logger;
 
 
 /**
@@ -41,6 +43,7 @@
  */
 public class HierarchicalObjectRepository<T> implements HierarchicalRepository<T>
 {
+   Logger log = Logger.getLogger(HierarchicalObjectRepository.class);
    /**
     * The default Match to fall back to
     */
@@ -61,7 +64,13 @@
     */
    private final Map<String, T> cache = new ConcurrentHashMap<String,T>();
    
+
    /**
+    * any registered listeners, these get fired on changes to the repository
+    */
+   private ArrayList<HierarchicalRepositoryChangeListener> listeners = new ArrayList<HierarchicalRepositoryChangeListener>();
+
+   /**
     * Add a new match to the repository
     *
     * @param match The regex to use to match against
@@ -74,7 +83,7 @@
       Match<T> match1 = new Match<T>(match);
       match1.setValue(value);
       matches.put(match, match1);
-
+      onChange();
    }
 
    /**
@@ -147,8 +156,19 @@
    public void removeMatch(final String match)
    {
       matches.remove(match);
+      onChange();
    }
 
+   public void registerListener(HierarchicalRepositoryChangeListener listener)
+   {
+      listeners.add(listener);
+   }
+
+   public void unRegisterListener(HierarchicalRepositoryChangeListener listener)
+   {
+      listeners.remove(listener);
+   }
+
    /**
     * set the default value to fallback to if none found
     *
@@ -160,6 +180,21 @@
       defaultmatch = defaultValue;
    }
 
+   private void onChange()
+   {
+      for (HierarchicalRepositoryChangeListener listener : listeners)
+      {
+         try
+         {
+            listener.onChange();
+         }
+         catch (Throwable e)
+         {
+            log.error("Unable to call listener:", e);
+         }
+      }
+   }
+
    /**
     * return any possible matches
     * @param match

Modified: trunk/src/main/org/jboss/messaging/core/settings/impl/QueueSettings.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/settings/impl/QueueSettings.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/src/main/org/jboss/messaging/core/settings/impl/QueueSettings.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -153,40 +153,8 @@
    }
 
 
-   public boolean equals(Object o)
-   {
-      if (this == o) return true;
-      if (o == null || getClass() != o.getClass()) return false;
+   
 
-      QueueSettings that = (QueueSettings) o;
-
-      if (clustered != that.clustered) return false;
-      if (maxDeliveryAttempts != that.maxDeliveryAttempts) return false;
-      if (maxSize != that.maxSize) return false;
-      if (messageCounterHistoryDayLimit != that.messageCounterHistoryDayLimit) return false;
-      if (redeliveryDelay != that.redeliveryDelay) return false;
-      if (DLQ != null ? !DLQ.equals(that.DLQ) : that.DLQ != null) return false;
-      if (ExpiryQueue != null ? !ExpiryQueue.equals(that.ExpiryQueue) : that.ExpiryQueue != null) return false;
-      if (distributionPolicyClass != null ? !distributionPolicyClass.equals(that.distributionPolicyClass) : that.distributionPolicyClass != null)
-         return false;
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      int result;
-      result = (clustered ? 1 : 0);
-      result = 31 * result + maxSize;
-      result = 31 * result + (distributionPolicyClass != null ? distributionPolicyClass.hashCode() : 0);
-      result = 31 * result + maxDeliveryAttempts;
-      result = 31 * result + messageCounterHistoryDayLimit;
-      result = 31 * result + (int) (redeliveryDelay ^ (redeliveryDelay >>> 32));
-      result = 31 * result + (DLQ != null ? DLQ.hashCode() : 0);
-      result = 31 * result + (ExpiryQueue != null ? ExpiryQueue.hashCode() : 0);
-      return result;
-   }
-
    /**
     * merge 2 objects in to 1
     * @param merged

Modified: trunk/tests/src/org/jboss/messaging/core/deployers/impl/test/unit/QueueSettingsDeployerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/core/deployers/impl/test/unit/QueueSettingsDeployerTest.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/tests/src/org/jboss/messaging/core/deployers/impl/test/unit/QueueSettingsDeployerTest.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -24,8 +24,11 @@
 import junit.framework.TestCase;
 
 import org.easymock.EasyMock;
+import org.easymock.IArgumentMatcher;
 import org.jboss.messaging.core.deployers.impl.QueueSettingsDeployer;
 import org.jboss.messaging.core.server.PostOffice;
+import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.core.server.impl.BindingImpl;
 import org.jboss.messaging.core.settings.HierarchicalRepository;
 import org.jboss.messaging.core.settings.impl.QueueSettings;
 import org.jboss.messaging.util.XMLUtil;
@@ -46,15 +49,16 @@
            "   </queue-settings>";
 
    private QueueSettingsDeployer queueSettingsDeployer;
-   
+
    private HierarchicalRepository<QueueSettings> repository;
+   private PostOffice postOffice;
 
    protected void setUp() throws Exception
    {
-   	PostOffice postOffice = EasyMock.createStrictMock(PostOffice.class);
-   	
-   	repository = EasyMock.createStrictMock(HierarchicalRepository.class);
-   	   	
+      postOffice = EasyMock.createMock(PostOffice.class);
+
+      repository = EasyMock.createStrictMock(HierarchicalRepository.class);
+
       queueSettingsDeployer = new QueueSettingsDeployer(postOffice, repository);
    }
 
@@ -62,12 +66,25 @@
    {
       QueueSettings queueSettings = new QueueSettings();
       queueSettings.setClustered(false);
-      queueSettings.setRedeliveryDelay((long)100);
+      queueSettings.setRedeliveryDelay((long) 100);
       queueSettings.setMaxSize(-100);
       queueSettings.setDistributionPolicyClass("org.jboss.messaging.core.impl.RoundRobinDistributionPolicy");
       queueSettings.setMessageCounterHistoryDayLimit(1000);
-      repository.addMatch("queues.*", queueSettings);
+      Queue mockDLQ = EasyMock.createMock(Queue.class);
+      queueSettings.setDLQ(mockDLQ);
+      EasyMock.expect(postOffice.getBinding("DLQtest")).andReturn(new BindingImpl(0, "DLQtest", mockDLQ));
+      EasyMock.expect(postOffice.getBinding("DLQtest")).andReturn(new BindingImpl(0, "DLQtest", mockDLQ));
+      Queue mockQ = EasyMock.createMock(Queue.class);
+      queueSettings.setExpiryQueue(mockQ);
+      EasyMock.expect(postOffice.getBinding("ExpiryQueueTest")).andReturn(new BindingImpl(0, "ExpiryQueueTest", mockQ));
+      EasyMock.expect(postOffice.getBinding("ExpiryQueueTest")).andReturn(new BindingImpl(0, "ExpiryQueueTest", mockQ));
+
+      EasyMock.replay(postOffice);
+
+      repository.addMatch(EasyMock.eq("queues.*"), settings(queueSettings));
+
       EasyMock.replay(repository);
+      EasyMock.reportMatcher(new QueueSettingsMatcher(queueSettings));
       queueSettingsDeployer.deploy(XMLUtil.stringToElement(conf));
    }
 
@@ -77,4 +94,44 @@
       EasyMock.replay(repository);
 
    }
+
+   public static QueueSettings settings(QueueSettings queueSettings)
+   {
+      EasyMock.reportMatcher(new QueueSettingsMatcher(queueSettings));
+      return queueSettings;
+   }
+
+   static class QueueSettingsMatcher implements IArgumentMatcher
+   {
+      QueueSettings queueSettings;
+
+      public QueueSettingsMatcher(QueueSettings queueSettings)
+      {
+         this.queueSettings = queueSettings;
+      }
+
+      public boolean matches(Object o)
+      {
+         if (this == o) return true;
+
+         QueueSettings that = (QueueSettings) o;
+
+         if (!queueSettings.getDLQ().equals(that.getDLQ())) return false;
+         if (!queueSettings.getExpiryQueue().equals(that.getExpiryQueue())) return false;
+         if (!queueSettings.isClustered().equals(that.isClustered())) return false;
+         if (!queueSettings.getDistributionPolicyClass().equals(that.getDistributionPolicyClass())) return false;
+         if (!queueSettings.getMaxDeliveryAttempts().equals(that.getMaxDeliveryAttempts())) return false;
+         if (!queueSettings.getMaxSize().equals(that.getMaxSize())) return false;
+         if (!queueSettings.getMessageCounterHistoryDayLimit().equals(that.getMessageCounterHistoryDayLimit()))
+            return false;
+         if (!queueSettings.getRedeliveryDelay().equals(that.getRedeliveryDelay())) return false;
+
+         return true;
+      }
+
+      public void appendTo(StringBuffer stringBuffer)
+      {
+         stringBuffer.append("Invalid Queue Settings created");
+      }
+   }
 }

Modified: trunk/tests/src/org/jboss/test/messaging/jms/SecurityTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/SecurityTest.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/tests/src/org/jboss/test/messaging/jms/SecurityTest.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -786,8 +786,6 @@
    protected void tearDown() throws Exception
    {
    	super.tearDown();
-   	
-   	servers.get(0).invalidateSecurity();
 
       setSecurityConfig(oldDefaultConfig);
       configureSecurityForDestination("Queue1", true,  null);

Modified: trunk/tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -662,8 +662,6 @@
 
    public void configureSecurityForDestination(String destName, boolean isQueue, HashSet<Role> roles) throws Exception
    {
-   	getMessagingServer().getSecurityStore().invalidateCache();
-   	
       String prefix = isQueue ? "queuejms." : "topicjms.";
       if (roles != null)
       {
@@ -674,11 +672,6 @@
          getMessagingServer().getSecurityRepository().removeMatch(prefix + destName);
       }
    }
-   
-   public void invalidateSecurity() throws Exception
-   {
-   	getMessagingServer().getSecurityStore().invalidateCache();
-   }
 
    public Object executeCommand(Command command) throws Exception
    {
@@ -817,7 +810,6 @@
 
    public void setSecurityConfig(HashSet<Role> defConfig) throws Exception
    {
-   	getMessagingServer().getSecurityStore().invalidateCache();
       getMessagingServer().getSecurityRepository().removeMatch("*");
       getMessagingServer().getSecurityRepository().addMatch("*", defConfig);      
    }
@@ -826,7 +818,6 @@
    public void setSecurityConfigOnManager(boolean b, String s, HashSet<Role> conf) throws Exception
    {
       String prefix = b ? "queuejms." : "topicjms.";
-      getMessagingServer().getSecurityStore().invalidateCache();
       getMessagingServer().getSecurityRepository().addMatch(prefix + s, conf);
    }
 

Modified: trunk/tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/tests/src/org/jboss/test/messaging/tools/container/RMITestServer.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -586,10 +586,6 @@
       return new InitialContext(env);
    }
    
-   public void invalidateSecurity() throws Exception
-   {
-   	server.invalidateSecurity();
-   }
 
    // Inner classes -------------------------------------------------
 }

Modified: trunk/tests/src/org/jboss/test/messaging/tools/container/Server.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/container/Server.java	2008-02-27 09:05:28 UTC (rev 3807)
+++ trunk/tests/src/org/jboss/test/messaging/tools/container/Server.java	2008-02-27 10:37:40 UTC (rev 3808)
@@ -274,6 +274,4 @@
 
    //void setDefaultRedeliveryDelay(long delay) throws Exception;
    JMSServerManager getJMSServerManager() throws Exception;
-   
-   void invalidateSecurity() throws Exception;
 }




More information about the jboss-cvs-commits mailing list