diff --git a/akka-actor/src/main/scala/dispatch/MailboxHandling.scala b/akka-actor/src/main/scala/dispatch/MailboxHandling.scala index d12c326bbf..fe84e04ff2 100644 --- a/akka-actor/src/main/scala/dispatch/MailboxHandling.scala +++ b/akka-actor/src/main/scala/dispatch/MailboxHandling.scala @@ -4,7 +4,7 @@ package se.scalablesolutions.akka.dispatch -import se.scalablesolutions.akka.actor.{Actor, ActorRef, ActorInitializationException} +import se.scalablesolutions.akka.actor.{Actor, ActorType, ActorRef, ActorInitializationException} import se.scalablesolutions.akka.util.{SimpleLock, Duration, HashCode, Logging} import se.scalablesolutions.akka.util.ReflectiveAccess.EnterpriseModule import se.scalablesolutions.akka.AkkaException @@ -104,7 +104,8 @@ trait MailboxFactory { * Creates and returns a durable mailbox for the given actor. */ protected def createDurableMailbox(actorRef: ActorRef, mailboxType: DurableMailboxType): AnyRef = mailboxType match { - case FileBasedDurableMailbox(serializer) => EnterpriseModule.createFileBasedMailbox(actorRef.uuid, serializer).asInstanceOf[MessageQueue] + // FIXME make generic (work for TypedActor as well) + case FileBasedDurableMailbox(serializer) => EnterpriseModule.createFileBasedMailbox(actorRef.uuid, ActorType.ScalaActor, None).asInstanceOf[MessageQueue] case RedisBasedDurableMailbox(serializer) => throw new UnsupportedOperationException("RedisBasedDurableMailbox is not yet supported") case BeanstalkBasedDurableMailbox(serializer) => throw new UnsupportedOperationException("BeanstalkBasedDurableMailbox is not yet supported") case ZooKeeperBasedDurableMailbox(serializer) => throw new UnsupportedOperationException("ZooKeeperBasedDurableMailbox is not yet supported") diff --git a/akka-actor/src/main/scala/util/ReflectiveAccess.scala b/akka-actor/src/main/scala/util/ReflectiveAccess.scala index 9eec8f076b..974250bc84 100644 --- a/akka-actor/src/main/scala/util/ReflectiveAccess.scala +++ b/akka-actor/src/main/scala/util/ReflectiveAccess.scala @@ -222,12 +222,13 @@ object ReflectiveAccess extends Logging { def ensureEnterpriseEnabled = if (!isEnterpriseEnabled) throw new ModuleNotAvailableException( "Feature is only available in Akka Enterprise") - def createFileBasedMailbox(name: String, serializer: Serializer): FileBasedMailbox = { + def createFileBasedMailbox( + name: String, actorType: ActorType, typedActorInfo: Option[Tuple2[String, String]]): FileBasedMailbox = { ensureEnterpriseEnabled createInstance( "se.scalablesolutions.akka.cluster.FileBasedMailbox", - Array(classOf[String], serializerClass.get), - Array(name, serializer).asInstanceOf[Array[AnyRef]], + Array(classOf[String], classOf[ActorType], classOf[Option[Tuple2[String, String]]]), + Array(name, actorType, typedActorInfo).asInstanceOf[Array[AnyRef]], loader) .getOrElse(throw new IllegalActorStateException("Could not create file-based mailbox")) .asInstanceOf[FileBasedMailbox]