Aaronontheweb on 1.3.16
Aaronontheweb on master
close #3935 - Akka.Persistence.… fix: data provided to AndThen (… Akka.Persistence.Query: made Of… and 13 more (compare)
* SocketChannel does not exists in the .NET BCL - This class is an adapter to hide the differences in CLR & JVM IO. * This implementation uses blocking IO calls, and then catch SocketExceptions if the socket is set to non blocking. * This might introduce performance issues, with lots of thrown exceptions * TODO: Implements this class with .NET Async calls */
Hi, I'm trying to create a child actor in F# (not using F# api but classes) and I have the following exception:
[ERROR][15/04/2017 09:07:26][Thread 0003][akka://MovieStreamingActorSystem/user/Playback/UserCoordinator/User42] Error while creating actor instance of type Actors+UserActor with 1 args: (System.Int32) Cause: [akka://MovieStreamingActorSystem/user/Playback/UserCoordinator/User42#197236877]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Actors+UserActor with 1 args: (System.Int32) ---> System.MissingMethodException: Constructor on type 'Actors+UserActor' not found. at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object args, CultureInfo culture, Object activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object args, CultureInfo culture, Object activationAttributes) at System.Activator.CreateInstance(Type type, Object args) at Akka.Actor.Props.ActivatorProducer.Produce() at Akka.Actor.Props.NewActor() --- End of inner exception stack trace --- at Akka.Actor.Props.NewActor() at Akka.Actor.ActorCell.CreateNewActorInstance() at Akka.Actor.ActorCell.<>c__DisplayClass115_0.<NewActor>b__0() at Akka.Actor.ActorCell.UseThreadContext(Action action) at Akka.Actor.ActorCell.NewActor() at Akka.Actor.ActorCell.Create(Exception failure) --- End of inner exception stack trace --- at Akka.Actor.ActorCell.Create(Exception failure) at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)
Although my class is as follows:
type UserActor(userId : int) as this = inherit ReceiveActor() let userId = userId
And I try to create it like that:
let newChildActorRef = UserCoordinatorActor.Context.ActorOf(Props.Create(typeof<UserActor>, [|userId|]), "User" + userId.ToString())
Regarding DI (autofac) integration. The docs say: The basic functionality is provided by a DependencyResolver class, that can create Props using the DI container. with example ending with this
IDependencyResolver resolver = new XyzDependencyResolver(someContainer, system);
then there's When creating actorRefs straight off your ActorSystem instance, you can use the DI() Extension..
I don't understand that - in the example the resolver isn't used anywhere. And where does the system.DI() method know which DI container to use?