This content has been marked as final.
Show 2 replies
-
1. Re: How to use different implementation of UserGroupCallback for each Process?
swiderski.maciej Jul 9, 2013 3:58 AM (in response to thomas.setiabudi)1 of 1 people found this helpfulI am afraid that it cannot be easily achieved as there are some contextual information missing. UserGroupCallbackManager is a singleton so you can't register other implementations. One thing that you could try is to:
- register custom implementation of UserGroupCallback that is capable of delegating the actual checks to some other implementation
- make the UserGroupCallback impl context aware - for example pass some contextual data via ThreadLocal
- based on contextual data make the decision on what delegate should be used
That way you have one master UserGroupCallback registered but it does not decide itself but always delegate to others based on some data such as process id or so.
HTH
-
2. Re: How to use different implementation of UserGroupCallback for each Process?
thomas.setiabudi Jul 9, 2013 5:15 AM (in response to swiderski.maciej)Thank you Maciej,
I have not thought about using ThreadLocal at all.
Haven't implemented your method but will try it.
Regards,
Thomas Setiabudi