On 17/01/2010 19:43, [email protected] wrote:

On Jan 17, 6:10 am, Willi Schönborn<[email protected]>
wrote:
we have a custom made framework here which has 4 scopes:
- Application
- HTTP Session
- HTTP Request
- Call

Call is something that can happen multiple times during one request.
I dont think there is really a need to understand the semantic,  anyways
the request is bound to a thread, so i can use a threadlocal to keep track
of the current request, which itself has a reference to the current session.
Any idea how i can keep track of the current call?
Take a look at CustomScopes:
   http://code.google.com/p/google-guice/wiki/CustomScopes
I know about custom scopes, what i need is a hint/idea/whatever how to implement a scope that does not rely on a threadlocal. All non-singleton scopes i know about, like the request scope, the session scope or the example implementatio of simple scope (see your link) are all based on a threadlocal which itself only works when you use threads. The problem is, my custom scope (@CallScoped) is shorter than a request, so i cant use a threadlocal.
-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.


Reply via email to