Hi Hosam, why do you want to run Akka using 2 threads? Where do you configure the calling thread dispatcher?
-- Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 14 July 2015 at 17:02:16, Hosam Aly ([email protected]) wrote: Hi, I am trying to use the `CallingThreadDispatcherConfigurator`, but unfortunately the test blocks as soon as I try to instantiate an actor, with a deadlock that looks similar to an akka issue. Have you faced a similar situation before? Do you have any idea how to get it working? On Thursday, January 19, 2012 at 4:00:04 PM UTC, D Pars wrote: Patrik, This works like a charm! (...he says as he deletes dozens and dozens of Thread.sleeps from his tests). Thank you! On Jan 19, 4:31 am, Patrik Nordwall <[email protected]> wrote: > You should define the class name of the MessageDispatcherConfigurator, not > the actual dispatcher. > Try type = "akka.testkit.CallingThreadDispatcherConfigurator" > > > > > > > > > > On Wed, Jan 18, 2012 at 10:50 PM, D Pars <[email protected]> wrote: > > On my TEST classpath, I'm trying to use a .conf file with a > > CallingThreadDispatcher to mimic the behavior of a TestActorRef. > > > Is there a way to do this globally? > > > The following: > > > default-dispatcher { > > type="akka.testkit.CallingThreadDispatcher" > > } > > > Is resulting in: > > > java.lang.IllegalArgumentException: Cannot instantiate > > MessageDispatcherConfigurator type > > [akka.testkit.CallingThreadDispatcher], defined in [akka.actor.default- > > dispatcher], make sure it has constructor with > > [com.typesafe.config.Config] and > > [akka.dispatch.DispatcherPrerequisites] parameters > > at akka.dispatch.Dispatchers.configuratorFrom(Dispatchers.scala:149) > > at > > akka.dispatch.Dispatchers.lookupConfigurator(Dispatchers.scala:78) > > at akka.dispatch.Dispatchers.lookup(Dispatchers.scala:68) > > at > > akka.dispatch.Dispatchers.defaultGlobalDispatcher(Dispatchers.scala: > > 58) > > at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:368) > > at akka.actor.ActorSystem$.apply(ActorSystem.scala:46) > > at akka.actor.ActorSystem$.create(ActorSystem.scala:45) > > at akka.actor.ActorSystem.create(ActorSystem.scala) > > ... > > Caused by: java.lang.NoSuchMethodException: > > akka.testkit.CallingThreadDispatcher.<init>(com.typesafe.config.Config, > > akka.dispatch.DispatcherPrerequisites) > > at java.lang.Class.getConstructor0(Class.java:2706) > > at java.lang.Class.getDeclaredConstructor(Class.java:1985) > > at akka.util.ReflectiveAccess$$anonfun$createInstance > > $2.apply(ReflectiveAccess.scala:35) > > at akka.util.ReflectiveAccess$$anonfun$createInstance > > $2.apply(ReflectiveAccess.scala:30) > > at akka.util.ReflectiveAccess > > $.withErrorHandling(ReflectiveAccess.scala:106) > > at > > akka.util.ReflectiveAccess$.createInstance(ReflectiveAccess.scala: > > 30) > > at akka.dispatch.Dispatchers.configuratorFrom(Dispatchers.scala:146) > > ... 38 more > > > -- > > You received this message because you are subscribed to the Google Groups > > "Akka User List" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/akka-user?hl=en. > > -- > > Patrik Nordwall > Typesafe <http://typesafe.com/> - The software stack for applications that > scale > Twitter: @patriknw -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> 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/d/optout. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> 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/d/optout.
