Because the thread might use any number of different services and it would be nice to be able to just grab them at will from another thread rather than modifying a constructor each time. I guess I'll just have pass all the objects. Thanks for the help!
Zack Kalle Korhonen-2 wrote: > > On Thu, Oct 1, 2009 at 10:09 AM, zack1403 <zack.mann...@gmail.com> wrote: >> Sorry yea I shouldnt have used quartz as an example. I use job data map >> to >> pass hibernate stuff through in that case but what about a standalone new >> thread? I have a service that spawns new tasks in new threads. Is there >> a >> way i can inject something like service resources? > > No, not as far as I know - I suppose you could try get access to the > same service registry instance but it's well-hidden for a reason. Why > don't you just pass the required services to the thread at its > construction? > > Kalle > >> Kalle Korhonen-2 wrote: >>> >>> You put the service in JobDataMap and in Job you get the map from >>> JobExecutionContext. >>> >>> Kalle >>> >>> >>> On Thu, Oct 1, 2009 at 9:44 AM, zack1403 <zack.mann...@gmail.com> wrote: >>>> >>>> Hi Everyone, >>>> >>>> I have been looking through the docs and mailing list but cant find and >>>> answer to this. What is the best way to get an autobuilt service from >>>> a >>>> separate thread? I have a quartz job that needs one of my services but >>>> im >>>> not sure what i do to get it. >>>> >>>> Thanks, >>>> Zack >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Best-way-to-get-service-from-different-thread-tp25701647p25701647.html >>>> Sent from the Tapestry - User mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Best-way-to-get-service-from-different-thread-tp25701647p25702945.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/Best-way-to-get-service-from-different-thread-tp25701647p25704884.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org