I want to have something akin to System properties but have them visible only to a thread/threadgroup and all threads/groups below it. Is there any way to do this? Can it be done with System properties?
You could try a ThreadLocal object and put a Properties object in it. Actually if you want the object to be inherited by child threads that it creates, an InheritedThreadLocal object would be the thing to use.
Originally posted by Dan Bizman: I want to have something akin to System properties but have them visible only to a thread/threadgroup and all threads/groups below it.
What do you need them for?
Sounds to me that you might benefit from rethinking your design - system properties are basically global variables, and therefore should be used *very* carefully.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Evacuate the building! Here, take this tiny ad with you: