On Aug 28, 2009, at 3:14 AM, Michael Ludwig wrote:

> Alex schrieb:
>>>> <web-app>
>>>>  <system-property
>>>> javax
>>>> .xml.stream.XMLInputFactory="org.codehaus.stax2.XMLInputFactory2"/>
>>>> </web-app>
>>> But wouldn't that set the property for the entire JVM instead of for
>>> one particular webapp/
>>
>> Not if you supply your own context aware instance of Properties using
>> System.setProperties(Properties).
>>
>> That isolates the apps/hosts/cluster from each other and they can  
>> have
>> their own sets of properties.
>
> What is a context-aware instance of Properties? How do I get one?
>
> Wouldn't I rather need a context-aware instance of System (which I  
> don't
> know about)?

If you're using Resin, you already have one.  Resin's system  
properties depend on the current context.

-- Scott

>
>
> I just tested this doing System.getProperty("milu.test") in a JSP in
> webapp xxx and then deployed webapp yyy whose ServletContextListener
> does System.setProperties(props) where props contains "milu.test" set
> to a different value. That affects not only webapp yyy, but also  
> webapp
> xxx, which now shows the value set by xxx.
>
> How would I use System.setProperties(props) without affecting the  
> entire
> JVM?
>
> -- 
> Michael Ludwig
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to