activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmacn...@apache.org
Subject svn commit: r891028 - /activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/Actor.java
Date Tue, 15 Dec 2009 22:09:06 GMT
Author: cmacnaug
Date: Tue Dec 15 22:09:06 2009
New Revision: 891028

URL: http://svn.apache.org/viewvc?rev=891028&view=rev
Log:
Fixing cglib actor invocation to invoke methods on the original target.

Modified:
    activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/Actor.java

Modified: activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/Actor.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/Actor.java?rev=891028&r1=891027&r2=891028&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/Actor.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dispatcher/src/main/java/org/apache/activemq/actor/Actor.java
Tue Dec 15 22:09:06 2009
@@ -32,7 +32,7 @@
         Enhancer e = new Enhancer();
         e.setSuperclass(target.getClass());
         e.setInterfaces(interfaces);
-        e.setCallback(new ActorMethodInterceptor(queue));
+        e.setCallback(new ActorMethodInterceptor(target, queue));
 //      Un-comment the following if you want store the generated class file:
 //        e.setStrategy(new DefaultGeneratorStrategy() {
 //            protected byte[] transform(byte[] b) {
@@ -82,9 +82,11 @@
     private static class ActorMethodInterceptor implements MethodInterceptor {
 
         private final DispatchQueue queue;
-
-        ActorMethodInterceptor(DispatchQueue queue) {
+        private final Object target;
+        
+        ActorMethodInterceptor(Object target, DispatchQueue queue) {
             this.queue = queue;
+            this.target = target;
         }
 
         /*
@@ -99,7 +101,7 @@
                 queue.dispatchAsync(new Runnable() {
                     public void run() {
                         try {
-                            proxy.invokeSuper(obj, args);
+                            proxy.invoke(target, args);
                         } catch (Throwable thrown) {
                             throw new IllegalStateException(thrown);
                         }
@@ -107,7 +109,7 @@
                 });
                 return null;
             } else {
-                return proxy.invokeSuper(obj, args);
+                return proxy.invoke(target, args);
             }
         }
     }



Mime
View raw message