Hi,
I am using Spray client within tomcat. I am wondering if any one has ever
faced this situation. I need to shutdown my spray client when tomcat is
shutdown. However the classic shutdown hook as in
Runtime.getRuntime().addShutdownHook(new Thread() {
override def run() {
println("shutting down spray")
IO(Http) ! Http.CloseAll
IO(Http) ! PoisonPill
system.shutdown();
}
})
Does not work.
I introduce it in my service that actually to rest call to other service
that are external from within a tomcat webapp
case class PClassificationService(name: String) extends ClassificationService {
implicit val requestTimeout = Timeout(800 seconds)
implicit val system = ActorSystem("simple-spray-client")
/*Runtime.getRuntime().addShutdownHook(new Thread() {
override def run() {
println("shutting down spray")
IO(Http) ! Http.CloseAll
IO(Http) ! PoisonPill
system.shutdown();
}
})*/
......
--
>>>>>>>>>> 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.