kazuf3 commented on code in PR #702: URL: https://github.com/apache/pekko-grpc/pull/702#discussion_r3261125042
########## plugin-tester-java/src/main/java/example/myapp/typedhelloworld/GreeterServiceImpl.java: ########## @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * license agreements; and to You under the Apache License, version 2.0: + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * This file is part of the Apache Pekko project, which was derived from Akka. + */ + +/* + * Copyright (C) 2018-2021 Lightbend Inc. <https://www.lightbend.com> + */ + +package example.myapp.typedhelloworld; + + +import example.myapp.statefulhelloworld.grpc.*; +import java.time.Duration; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionStage; +import org.apache.pekko.actor.typed.ActorRef; +import org.apache.pekko.actor.typed.ActorSystem; +import org.apache.pekko.actor.typed.javadsl.AskPattern; + +// #stateful-service +public final class GreeterServiceImpl implements GreeterService { + + private final ActorSystem system; + private final ActorRef<GreeterActor.GreetingCommand> greeterActor; + + public GreeterServiceImpl(ActorSystem system, ActorRef<GreeterActor.GreetingCommand> greeterActor) { Review 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
