diff --git a/akka-remote/src/main/scala/remote/RemoteServer.scala b/akka-remote/src/main/scala/remote/RemoteServer.scala index c85f2913e0..b14e514b32 100644 --- a/akka-remote/src/main/scala/remote/RemoteServer.scala +++ b/akka-remote/src/main/scala/remote/RemoteServer.scala @@ -16,7 +16,6 @@ import akka.remote.protocol.RemoteProtocol._ import akka.remote.protocol.RemoteProtocol.ActorType._ import akka.config.Config._ import akka.config.ConfigurationException -import akka.dispatch.{DefaultCompletableFuture, CompletableFuture} import akka.serialization.RemoteActorSerialization import akka.serialization.RemoteActorSerialization._ @@ -31,6 +30,7 @@ import org.jboss.netty.handler.ssl.SslHandler import scala.collection.mutable.Map import scala.reflect.BeanProperty +import akka.dispatch. {Future, DefaultCompletableFuture, CompletableFuture} /** * Use this object if you need a single remote server on a specific node. @@ -66,10 +66,10 @@ object RemoteNode extends RemoteServer * @author Jonas Bonér */ object RemoteServer { - val UUID_PREFIX = "uuid:" - - val SECURE_COOKIE: Option[String] = config.getString("akka.remote.secure-cookie") - val REQUIRE_COOKIE = { + val UUID_PREFIX = "uuid:" + val MESSAGE_FRAME_SIZE = config.getInt("akka.remote.server.message-frame-size", 1048576) + val SECURE_COOKIE = config.getString("akka.remote.secure-cookie") + val REQUIRE_COOKIE = { val requireCookie = config.getBool("akka.remote.server.require-cookie", true) if (requireCookie && RemoteServer.SECURE_COOKIE.isEmpty) throw new ConfigurationException( "Configuration option 'akka.remote.server.require-cookie' is turned on but no secure cookie is defined in 'akka.remote.secure-cookie'.") @@ -400,7 +400,7 @@ class RemoteServerPipelineFactory( } val ssl = if(RemoteServer.SECURE) join(new SslHandler(engine)) else join() - val lenDec = new LengthFieldBasedFrameDecoder(1048576, 0, 4, 0, 4) + val lenDec = new LengthFieldBasedFrameDecoder(RemoteServer.MESSAGE_FRAME_SIZE, 0, 4, 0, 4) val lenPrep = new LengthFieldPrepender(4) val protobufDec = new ProtobufDecoder(RemoteMessageProtocol.getDefaultInstance) val protobufEnc = new ProtobufEncoder diff --git a/akka-typed-actor/src/main/scala/actor/TypedActor.scala b/akka-typed-actor/src/main/scala/actor/TypedActor.scala index 98d9bcdea3..75d4764c55 100644 --- a/akka-typed-actor/src/main/scala/actor/TypedActor.scala +++ b/akka-typed-actor/src/main/scala/actor/TypedActor.scala @@ -181,7 +181,6 @@ abstract class TypedActor extends Actor with Proxyable { if (Actor.SERIALIZE_MESSAGES) serializeArguments(joinPoint) if (TypedActor.isOneWay(joinPoint)) joinPoint.proceed else self.reply(joinPoint.proceed) - case Link(proxy) => self.link(proxy) case Unlink(proxy) => self.unlink(proxy) case unexpected => throw new IllegalActorStateException( @@ -851,6 +850,7 @@ private[akka] abstract class ActorAspect { ActorType.TypedActor) if (isOneWay) null // for void methods + //else if (TypedActor.returnsFuture_?(methodRtti)) future.get else { if (future.isDefined) { future.get.await diff --git a/akka-typed-actor/src/test/java/se/scalablesolutions/akka/actor/SamplePojo.java b/akka-typed-actor/src/test/java/se/scalablesolutions/akka/actor/SamplePojo.java index 743a189bf6..5b9de51d44 100644 --- a/akka-typed-actor/src/test/java/se/scalablesolutions/akka/actor/SamplePojo.java +++ b/akka-typed-actor/src/test/java/se/scalablesolutions/akka/actor/SamplePojo.java @@ -1,8 +1,9 @@ package akka.actor; -import java.util.concurrent.CountDownLatch; +import akka.dispatch.Future; public interface SamplePojo { public String greet(String s); public String fail(); + public Future someFutureString(); } diff --git a/akka-typed-actor/src/test/java/se/scalablesolutions/akka/actor/SamplePojoImpl.java b/akka-typed-actor/src/test/java/se/scalablesolutions/akka/actor/SamplePojoImpl.java index 093904e5e1..b61fc2f366 100644 --- a/akka-typed-actor/src/test/java/se/scalablesolutions/akka/actor/SamplePojoImpl.java +++ b/akka-typed-actor/src/test/java/se/scalablesolutions/akka/actor/SamplePojoImpl.java @@ -25,6 +25,10 @@ public class SamplePojoImpl extends TypedActor implements SamplePojo { throw new RuntimeException("expected"); } + public akka.dispatch.Future someFutureString() { + return future("foo"); + } + @Override public void preRestart(Throwable e) { _pre = true; diff --git a/config/akka-reference.conf b/config/akka-reference.conf index 16aecf6bc9..c6f3647d0f 100644 --- a/config/akka-reference.conf +++ b/config/akka-reference.conf @@ -135,6 +135,7 @@ akka { service = on hostname = "localhost" # The hostname or IP that clients should connect to port = 2552 # The port clients should connect to + message-frame-size = 1048576 connection-timeout = 1 require-cookie = on untrusted-mode = off