[jboss-cvs] JBoss Messaging SVN: r5880 - in trunk: src/config and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 17 09:26:25 EST 2009


Author: ataylor
Date: 2009-02-17 09:26:25 -0500 (Tue, 17 Feb 2009)
New Revision: 5880

Modified:
   trunk/messaging.iml
   trunk/messaging.ipr
   trunk/src/config/jbm-queues.xml
   trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java
   trunk/src/main/org/jboss/messaging/core/settings/impl/Match.java
   trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/settings/impl/RepositoryTest.java
Log:
changed address settings to use same wildcard characters as the wildcard routing manager

Modified: trunk/messaging.iml
===================================================================
--- trunk/messaging.iml	2009-02-17 09:30:51 UTC (rev 5879)
+++ trunk/messaging.iml	2009-02-17 14:26:25 UTC (rev 5880)
@@ -97,6 +97,7 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntryProperties />
   </component>
   <component name="VcsManagerConfiguration">
     <option name="ACTIVE_VCS_NAME" value="svn" />

Modified: trunk/messaging.ipr
===================================================================
--- trunk/messaging.ipr	2009-02-17 09:30:51 UTC (rev 5879)
+++ trunk/messaging.ipr	2009-02-17 14:26:25 UTC (rev 5880)
@@ -84,6 +84,7 @@
     <option name="ADDITIONAL_OPTIONS_STRING" value="" />
     <option name="MAXIMUM_HEAP_SIZE" value="128" />
   </component>
+  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
   <component name="EntryPointsManager">
     <entry_points version="2.0" />
   </component>
@@ -340,6 +341,9 @@
       </item>
     </group>
   </component>
+  <component name="ProjectDetails">
+    <option name="projectName" value="messaging" />
+  </component>
   <component name="ProjectFileVersion" converted="true" />
   <component name="ProjectModuleManager">
     <modules>
@@ -362,6 +366,25 @@
     <option name="ADDITIONAL_OPTIONS_STRING" value="" />
   </component>
   <component name="SvnBranchConfigurationManager">
+    <option name="myConfigurationMap">
+      <map>
+        <entry key="$PROJECT_DIR$">
+          <value>
+            <SvnBranchConfiguration>
+              <option name="branchUrls">
+                <list>
+                  <option value="https://svn.jboss.org/repos/messaging/admin" />
+                  <option value="https://svn.jboss.org/repos/messaging/branches" />
+                  <option value="https://svn.jboss.org/repos/messaging/projects" />
+                  <option value="https://svn.jboss.org/repos/messaging/tags" />
+                </list>
+              </option>
+              <option name="trunkUrl" value="https://svn.jboss.org/repos/messaging/trunk" />
+            </SvnBranchConfiguration>
+          </value>
+        </entry>
+      </map>
+    </option>
     <option name="myVersion" value="123" />
   </component>
   <component name="VcsDirectoryMappings">
@@ -395,7 +418,6 @@
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/aop/lib/jboss-standalone-aspect-library-jdk50.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/aop/lib/jrockit-pluggable-instrumentor.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/aop/lib/pluggable-instrumentor.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/common/lib/jboss-common-client.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/common/lib/jboss-common.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/common/lib/namespace.jar!/" />
@@ -409,9 +431,6 @@
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jboss-common-logging-spi/lib/jboss-common-logging-spi.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jboss-jaspi-api/lib/jboss-jaspi-api.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jboss-javaee/lib/jboss-javaee.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jboss-retro/lib/jboss-retro-retrocheck.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jboss-retro/lib/jboss-retro-rt.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jboss-retro/lib/jboss-retro.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jboss-security-spi/lib/jboss-security-spi.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jbosssx-client/lib/jbosssx-client.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jbossts14/lib/jbossjta-integration.jar!/" />
@@ -440,13 +459,8 @@
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/microcontainer/lib/jboss-managed.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/microcontainer/lib/jboss-metatype.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/profiler/jvmti/lib/jboss-profiler-jvmti.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/jboss/test14/lib/jboss-test14.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/jgroups/lib/jgroups.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/junit/lib/junit.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/oswego-concurrent/lib/concurrent.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/retrotranslator/lib/backport-util-concurrent.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/retrotranslator/lib/retrotranslator-runtime.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/retrotranslator/lib/retrotranslator-transformer.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/snmptrapappender/lib/snmpTrapAppender.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/sun-javacc/lib/javacc.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/trove/lib/trove.jar!/" />
@@ -457,19 +471,20 @@
         <root url="file://$PROJECT_DIR$/tests/jms-tests/config" />
         <root url="file://$PROJECT_DIR$/src/config" />
         <root url="jar://$PROJECT_DIR$/thirdparty/easymock/lib/easymock.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/easymock-classextension/lib/easymockclassextension.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/cglib/lib/cglib.jar!/" />
         <root url="jar://$PROJECT_DIR$/tools/lib/jbossbuild.jar!/" />
         <root url="jar://$ANT_HOME$/lib/ant-junit.jar!/" />
         <root url="jar://$ANT_HOME$/lib/ant.jar!/" />
         <root url="jar://$PROJECT_DIR$/thirdparty/apache-mina/lib/mina-core-2.0.0-M4.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/netty/lib/netty-3.0.0.CR4.jar!/" />
+        <root url="file:///home/andy/etc" />
+        <root url="jar://$PROJECT_DIR$/thirdparty/netty/lib/netty-3.1.0.ALPHA2.jar!/" />
+        <root url="file://$PROJECT_DIR$/src/schemas" />
       </CLASSES>
       <JAVADOC />
       <SOURCES>
         <root url="jar://$PROJECT_DIR$/thirdparty/jboss/jnpserver/lib/jnpserver-sources.jar!/" />
-        <root url="jar://$PROJECT_DIR$/thirdparty/apache-mina/lib/mina-core-2.0.0-M2-20080520.004618-19-sources.jar!/" />
       </SOURCES>
+      <jarDirectory url="file:///home/andy/etc" recursive="false" />
       <jarDirectory url="file://$PROJECT_DIR$/src/etc" recursive="false" />
       <jarDirectory url="file://$PROJECT_DIR$/tests/etc" recursive="false" />
       <jarDirectory url="file://$PROJECT_DIR$/tests/jms-tests/etc" recursive="false" />

Modified: trunk/src/config/jbm-queues.xml
===================================================================
--- trunk/src/config/jbm-queues.xml	2009-02-17 09:30:51 UTC (rev 5879)
+++ trunk/src/config/jbm-queues.xml	2009-02-17 14:26:25 UTC (rev 5880)
@@ -66,7 +66,7 @@
    </security>-->
 
    <!--default security to catch all-->
-   <security match="*">
+   <security match="#">
       <permission type="create" roles="guest,def"/>
       <permission type="read" roles="guest,def"/>
       <permission type="write" roles="guest,def"/>
@@ -120,7 +120,7 @@
    </address-settings>
 
    <!--default for catch all-->
-   <address-settings match="*">
+   <address-settings match="#">
       <clustered>false</clustered>
       <dead-letter-address>queuejms.DLQ</dead-letter-address>
       <expiry-address>queuejms.ExpiryQueue</expiry-address>

Modified: trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java	2009-02-17 09:30:51 UTC (rev 5879)
+++ trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java	2009-02-17 14:26:25 UTC (rev 5880)
@@ -31,6 +31,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Timer;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
@@ -192,10 +193,10 @@
       if (messageExpiryScanPeriod > 0)
       {
          MessageExpiryRunner messageExpiryRunner = new MessageExpiryRunner();
-
          messageExpiryExecutor = new ScheduledThreadPoolExecutor(1, new JBMThreadFactory("JBM-scheduled-threads",
                                                                                          messageExpiryThreadPriority));
-         messageExpiryExecutor.scheduleAtFixedRate(messageExpiryRunner,
+         messageExpiryExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
+         messageExpiryExecutor.scheduleWithFixedDelay(messageExpiryRunner,
                                                    messageExpiryScanPeriod,
                                                    messageExpiryScanPeriod,
                                                    TimeUnit.MILLISECONDS);
@@ -210,6 +211,7 @@
       if (messageExpiryExecutor != null)
       {
          messageExpiryExecutor.shutdown();
+         messageExpiryExecutor.awaitTermination(60, TimeUnit.SECONDS);
       }
 
       addressManager.clear();
@@ -845,7 +847,7 @@
 
    private class MessageExpiryRunner implements Runnable
    {
-      public void run()
+      public synchronized void run()
       {
          Map<SimpleString, Binding> nameMap = addressManager.getBindings();
 
@@ -873,6 +875,7 @@
             }
          }
       }
+
    }
 
    private class PageMessageOperation implements TransactionOperation

Modified: trunk/src/main/org/jboss/messaging/core/settings/impl/Match.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/settings/impl/Match.java	2009-02-17 09:30:51 UTC (rev 5879)
+++ trunk/src/main/org/jboss/messaging/core/settings/impl/Match.java	2009-02-17 14:26:25 UTC (rev 5880)
@@ -29,9 +29,9 @@
  */
 public class Match<T>
 {	
-   public static String WORD_WILDCARD = "^";
+   public static String WORD_WILDCARD = "*";
    private static String WORD_WILDCARD_REPLACEMENT = "[^.]+";
-   public static String WILDCARD = "*";
+   public static String WILDCARD = "#";
    private static String WILDCARD_REPLACEMENT = ".+";
    private static final String DOT = ".";
    private static final String DOT_REPLACEMENT = "\\.";
@@ -115,7 +115,7 @@
       {
          throw new IllegalArgumentException("match can not be null");
       }
-      if(match.contains("*") && match.indexOf("*") < match.length() - 1)
+      if(match.contains("#") && match.indexOf("#") < match.length() - 1)
       {
          throw new IllegalArgumentException("* can only be at end of match");
       }

Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java	2009-02-17 09:30:51 UTC (rev 5879)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java	2009-02-17 14:26:25 UTC (rev 5880)
@@ -738,8 +738,8 @@
 
    public void setSecurityConfig(Set<Role> defConfig) throws Exception
    {
-      getMessagingServer().getSecurityRepository().removeMatch("*");
-      getMessagingServer().getSecurityRepository().addMatch("*", defConfig);
+      getMessagingServer().getSecurityRepository().removeMatch("#");
+      getMessagingServer().getSecurityRepository().addMatch("#", defConfig);
    }
 
    public void setRedeliveryDelayOnDestination(String dest, boolean queue, long delay) throws Exception

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/settings/impl/RepositoryTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/settings/impl/RepositoryTest.java	2009-02-17 09:30:51 UTC (rev 5879)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/settings/impl/RepositoryTest.java	2009-02-17 14:26:25 UTC (rev 5880)
@@ -91,58 +91,58 @@
    public void testMultipleWildcards()
    {
       HierarchicalRepository<String> repository = new HierarchicalObjectRepository<String>();
-      repository.addMatch("*", "*");
+      repository.addMatch("#", "#");
       repository.addMatch("a", "a");
+      repository.addMatch("a.#", "a.#");
       repository.addMatch("a.*", "a.*");
-      repository.addMatch("a.^", "a.^");
       repository.addMatch("a.b.c", "a.b.c");
-      repository.addMatch("a.^.c", "a.^.c");
+      repository.addMatch("a.*.c", "a.*.c");
       repository.addMatch("a.d.c", "a.d.c");
-      repository.addMatch("a.b.*", "a.b.*");
+      repository.addMatch("a.b.#", "a.b.#");
       repository.addMatch("a.b", "a.b");
-      repository.addMatch("a.b.c.*", "a.b.c.*");
+      repository.addMatch("a.b.c.#", "a.b.c.#");
       repository.addMatch("a.b.c.d", "a.b.c.d");
-      repository.addMatch("a.^.^.d", "a.^.^.d");
-      repository.addMatch("a.^.d.*", "a.^.d.*");
+      repository.addMatch("a.*.*.d", "a.*.*.d");
+      repository.addMatch("a.*.d.#", "a.*.d.#");
       String val = repository.getMatch("a");
       assertEquals("a", val);
       val = repository.getMatch("a.b");
       assertEquals("a.b", val);
       val = repository.getMatch("a.x");
-      assertEquals("a.^", val);
+      assertEquals("a.*", val);
       val = repository.getMatch("a.b.x");
-      assertEquals("a.b.*", val);
+      assertEquals("a.b.#", val);
       val = repository.getMatch("a.b.c");
       assertEquals("a.b.c", val);
       val = repository.getMatch("a.d.c");
       assertEquals("a.d.c", val);
       val = repository.getMatch("a.x.c");
-      assertEquals("a.^.c", val);
+      assertEquals("a.*.c", val);
       val = repository.getMatch("a.b.c.d");
       assertEquals("a.b.c.d", val);
       val = repository.getMatch("a.x.c.d");
-      assertEquals("a.^.^.d", val);
+      assertEquals("a.*.*.d", val);
       val = repository.getMatch("a.b.x.d");
-      assertEquals("a.^.^.d", val);
+      assertEquals("a.*.*.d", val);
       val = repository.getMatch("a.d.x.d");
-      assertEquals("a.^.^.d", val);
+      assertEquals("a.*.*.d", val);
       val = repository.getMatch("a.d.d.g");
-      assertEquals("a.^.d.*", val);
+      assertEquals("a.*.d.#", val);
       val = repository.getMatch("zzzz.z.z.z.d.r.g.f.sd.s.fsdfd.fsdfs");
-      assertEquals("*", val);
+      assertEquals("#", val);
    }
 
    public void testRepositoryMerge()
    {
       HierarchicalRepository<DummyMergeable> repository = new HierarchicalObjectRepository<DummyMergeable>();
-      repository.addMatch("*", new DummyMergeable(1));
-      repository.addMatch("a.*", new DummyMergeable(2));
-      repository.addMatch("b.*", new DummyMergeable(3));
-      repository.addMatch("a.b.*", new DummyMergeable(4));
-      repository.addMatch("b.c.*", new DummyMergeable(5));
-      repository.addMatch("a.b.c.*", new DummyMergeable(6));
-      repository.addMatch("a.b.^.d", new DummyMergeable(7));
-      repository.addMatch("a.b.c.^", new DummyMergeable(8));
+      repository.addMatch("#", new DummyMergeable(1));
+      repository.addMatch("a.#", new DummyMergeable(2));
+      repository.addMatch("b.#", new DummyMergeable(3));
+      repository.addMatch("a.b.#", new DummyMergeable(4));
+      repository.addMatch("b.c.#", new DummyMergeable(5));
+      repository.addMatch("a.b.c.#", new DummyMergeable(6));
+      repository.addMatch("a.b.*.d", new DummyMergeable(7));
+      repository.addMatch("a.b.c.*", new DummyMergeable(8));
       repository.getMatch("a.b.c.d");
       assertEquals(5, DummyMergeable.timesMerged);
       assertTrue(DummyMergeable.contains(1));
@@ -167,7 +167,7 @@
       HierarchicalRepository<String> repository = new HierarchicalObjectRepository<String>();
       try
       {
-         repository.addMatch("hjhjhjhjh.*.hhh", "test");
+         repository.addMatch("hjhjhjhjh.#.hhh", "test");
       }
       catch (IllegalArgumentException e)
       {




More information about the jboss-cvs-commits mailing list