added typed stateful helloworld and docs/.../server/walkthrough#702
Conversation
|
|
||
| Scala | ||
| : @@snip [GreeterServiceImpl.scala](/plugin-tester-scala/src/main/scala/example/myapp/statefulhelloworld/GreeterServiceImpl.scala) { #stateful-service } | ||
| : @@snip [GreeterServiceImpl.scala](/plugin-tester-scala/src/main/scala/example/myapp/typedhelloworld/GreeterServiceImpl.scala) { #stateful-service } |
There was a problem hiding this comment.
Could you revert these changes and add new paragraphs that link to the typed version?
|
Yes, I will do so. Also in this case, I have to write the Java version of using typed actors, right? |
Sure. The java code can be based on copy pasting the existing stateful java sample and modifying with similar changes that you made with the scala one. |
| private final ActorSystem system; | ||
| private final ActorRef<GreeterActor.GreetingCommand> greeterActor; | ||
|
|
||
| public GreeterServiceImpl(ActorSystem system, ActorRef<GreeterActor.GreetingCommand> greeterActor) { |
There was a problem hiding this comment.
@pjfanning I'm not very sure about this change. Instead of spawning the actor from root ActorSystem inside of service, let parent layer, possibly the server, to generate one from ActorContext and provide to the service.
There was a problem hiding this comment.
My thought is that's better for testing, especially with ActorTestKit.
|
Still need to figure out issues on paradox and mvn test |
|
All 4 tests (Format, Gradle, Maven, Paradox) passed locally. |
|
I see. It's my bad, I forgot test these two in plugin-tester-scala. |
Updated recommendation for using typed actors in the walkthrough.
See #699 and #698