Hi Johannes, You're looking for a ServletContextListener,
a quick googling turned this up, it looks OK, but YYMV: http://blog.nemccarthy.me/?p=295 On Mon, Nov 10, 2014 at 4:05 PM, oem oem <[email protected]> wrote: > Hi Anders, > > thanks for your reply. > > As I understand: To get request processing working on Java-Appservers I > will need a servlet to process the requests. So the servlet will be called > for every request. > As I see that as long as I don't want to keep the actor-system in the > session I will need to create a new one on each request right? > > I don't see a way to create a global usable actor system that I can use > user/session independent in my servlets while handling requests. > Or how would you solve the issue? > > The main goal for the actors is to fetch data in parallel from different > sources and aggregate it. > Like: So a request comes in -> servlet parses the request parameters -> > starts an actor system -> starts several actors that do processing > (fetching/transforming) -> aggregates / collect the results -> returns > response > That is meant by saying "create an actor system for the request to get the > parallelism working." > > Regards Johannes > > > Am Montag, 10. November 2014 14:45:11 UTC+1 schrieb Anders Båtstrand: > >> Hi >> >> Why do you have to create the actor system on each request, and not >> simply create a new actor? >> >> I did not understand the following: "create an actor system for the >> request to get the parallelism working." >> >> Kind regards, >> >> Anders >> >> kl. 14:30:21 UTC+1 mandag 10. november 2014 skrev oem oem følgende: >>> >>> Hi, >>> >>> I'm pretty new to Akka and would like to build a kind of resource-loader >>> with it. On a HttpRequest I would like to gather async informations from >>> different sources and return them aggregated. >>> The Problem is that since this application has to run in a classical >>> Java-Appserver like JBoss I'll have to use a servlet for the request >>> handling and create an actor system for the request to get the parallelism >>> working. >>> >>> Since I've heard a few times that creating an actor system is expensive >>> I'd like to know whether creating one on per request is a good idea or not. >>> Are there other possibilities? >>> >>> Thanks and regards >>> Johannes >>> >> -- > >>>>>>>>>> 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. > -- Cheers, √ -- >>>>>>>>>> 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.
