I see the ticket was been marked wontfix and a work round suggested which 
seems to be in full

    import scala.concurrent.ExecutionContext.Implicits.global
    implicit val timeout = Timeout(5 seconds)
    val futureRef = 
system.actorSelection(connectionString).resolveOne().map(ref => 
TypedActor(system).typedActorOf(TypedProps(clazz).withTimeout(timeOut).withDispatcher("client-dispatcher"),ref))
    val typedActorRef = Await.result(futureRef, 5 seconds)

which seems a lot of code to replace 

    val typedActorRef = TypedActor(system).
typedActorOf(TypedProps(clazz).withTimeout(timeOut).withDispatcher("client-dispatcher"),
      system.actorFor(connectionString))

am I missing something?



On Monday, 11 November 2013 15:25:41 UTC, Brian Fowler wrote:
>
> Thanks Roland, the ticket is 
> https://www.assembla.com/spaces/ddEDvgVAKr3QrUeJe5aVNr/tickets/3716#/activity/ticket
> :
>
> I think for now I might like with the deprecated code, resolving actorRefs 
> from actorSelections is a bit of a pain.
>
> Brian
>
> On Monday, 11 November 2013 14:57:39 UTC, Brian Fowler wrote:
>>
>> Hi,
>>
>> I'm in the process of upgrading our system from 2.1.4 to 2.2.3. It's 
>> going well, all our unit tests and soak tests still pass whoever I'm at a 
>> loss as to what to do about the following line
>>
>>     val typedActorRef = 
>> TypedActor(system).typedActorOf(TypedProps(clazz).withTimeout(timeOut).withDispatcher("client-dispatcher"),
>>       system.actorFor(connectionString))
>>
>> It is fine as it is in 2.2.3 but system.actorFor(connectionString) is 
>> deprecated and I've rather not leave deprecated source in the code base. 
>> The connectionString in question is to a remote actor endpoint. The 
>> replacement is actorSelection but typedActorOf does not take its return 
>> type i.e. 
>>
>>     val typedActorRef = 
>> TypedActor(system).typedActorOf(TypedProps(clazz).withTimeout(timeOut).withDispatcher("client-dispatcher"),
>>       system.actorSelection (connectionString))
>>
>> won't work.
>>
>> I note the Proxying sections of 
>> http://doc.akka.io/docs/akka/2.2.3/scala/typed-actors.html still says 
>> pass an actorRef to typedActorOf 
>>
>> Can anyone help?
>>
>> Thanks,
>>
>> Brian
>>
>>
>>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to