Re: Best way to get service from different thread

2009-10-01 Thread Howard Lewis Ship
When there are per-thread services they are there for a reason. They tend to be rare, and hold data specific to a single request. Remember that the proxies are completely shareable across threads, the dispatch to the per-thread instance occurs INSIDE the proxy. As usual, rather than asking for a

Re: Best way to get service from different thread

2009-10-01 Thread zack1403
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

Re: Best way to get service from different thread

2009-10-01 Thread Kalle Korhonen
On Thu, Oct 1, 2009 at 10:09 AM, zack1403 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 injec

Re: Best way to get service from different thread

2009-10-01 Thread zack1403
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? Zack Kalle Korhone

Re: Best way to get service from different thread

2009-10-01 Thread Kalle Korhonen
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 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 s