You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2009/12/17 21:30:00 UTC

svn commit: r891873 - in /activemq/sandbox/activemq-apollo-actor: activemq-dispatcher/src/main/java/org/apache/activemq/actor/ActorProxy.java activemq-queue/src/test/java/org/apache/activemq/queue/actor/perf/MockBrokerTest.java

Author: chirino
Date: Thu Dec 17 20:29:59 2009
New Revision: 891873

URL: http://svn.apache.org/viewvc?rev=891873&view=rev
Log:
Fixing concurrency issue with the actor proxy.

Modified:
    activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/ActorProxy.java
    activemq/sandbox/activemq-apollo-actor/activemq-queue/src/test/java/org/apache/activemq/queue/actor/perf/MockBrokerTest.java

Modified: activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/ActorProxy.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/ActorProxy.java?rev=891873&r1=891872&r2=891873&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/ActorProxy.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/ActorProxy.java Thu Dec 17 20:29:59 2009
@@ -22,7 +22,7 @@
         return create(target.getClass().getClassLoader(), interfaceClass, target, queue);
     }
     
-    public static <T> T create(ClassLoader classLoader, Class<T> interfaceClass, T target, DispatchQueue queue) throws IllegalArgumentException {
+    synchronized public static <T> T create(ClassLoader classLoader, Class<T> interfaceClass, T target, DispatchQueue queue) throws IllegalArgumentException {
         Class<T> proxyClass = getProxyClass(classLoader, interfaceClass);
         Constructor<?> constructor = proxyClass.getConstructors()[0];
         Object rc;

Modified: activemq/sandbox/activemq-apollo-actor/activemq-queue/src/test/java/org/apache/activemq/queue/actor/perf/MockBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-queue/src/test/java/org/apache/activemq/queue/actor/perf/MockBrokerTest.java?rev=891873&r1=891872&r2=891873&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-queue/src/test/java/org/apache/activemq/queue/actor/perf/MockBrokerTest.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-queue/src/test/java/org/apache/activemq/queue/actor/perf/MockBrokerTest.java Thu Dec 17 20:29:59 2009
@@ -34,7 +34,7 @@
  */
 public class MockBrokerTest extends TestCase {
 
-    protected static final int PERFORMANCE_SAMPLES = 30000000;
+    protected static final int PERFORMANCE_SAMPLES = 3;
     protected static final int SAMPLING_FREQUENCY = 5;
 
     protected static final int FANIN_COUNT = 10;