« Return to Thread: Problem with log in orbeon with multiple webapp

Re: Re: Re: Re: RE: Re: Problem with log in orbeon with multiple webapp

by Michael Roberts-10 :: Rate this Message:

Reply to Author | View in Thread

Thanks for your reply Alex.

No, we chose not to modify the Orbeon source because I would rather  
have a clean upgrade path and so I stay away from modifying in that  
way as much as is feasible.

Our code does set the value back to the normal value, just so that  
other webapps that might be in the same container (for the future)  
will function as expected:
   System.setProperty("log4j.configuration", "log4j.properties");

We have three webapps besides "ops" running in the same Tomcat  
container.  One of these apps loads the configuration manually (for  
reasons unrelated to the Orbeon issue), while the other two rely on  
Log4j finding the log4j.properties file in the normal way.  All are  
logging fine again, to a common console logger that is shared by all  
four webapps.

Cheers,
Michael Roberts

On Apr 30, 2008, at 8:51 PM, Alessandro Vernet wrote:

> Michael,
>
> On Wed, Apr 30, 2008 at 5:34 AM, Michael Roberts <mroberts@...
> > wrote:
>> The problem occurs because the Orbeon webapp sets a system property  
>> named
>> "log4j.configuration" in the org.orbeon.oxf.util.LoggerFactory.  
>> Because
>> this value is deliberately set to a bogus value, any webapps in the  
>> same JVM
>> (same tomcat in this case) that start after Orbeon, will fail using  
>> the
>> regular configuration discovery mechanisms of Log4j.
>>
>> I am not sure if the conditions for this design decision are still  
>> present.
>> They might be.  My opinion is that any webapp that sets a system  
>> property
>> better have an extremely good reason for doing so, given that system
>> properties are shared across the entire JVM, not just webapp.
>
> Indeed, I agree that setting a system property can be considered to be
> reasonably evil and I am not sure we still have a good reason do that.
> Have you tried removing that call to System.setProperty(
> "log4j.configuration", "-there-aint-no-such-file-" )? If you have, can
> you confirm that everything is working fine without it?
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
> Twitter - http://twitter.com/avernet
>
> --
> You receive this message as a subscriber of the ops-users@...  
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@...
> For general help: mailto:sympa@...?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

 « Return to Thread: Problem with log in orbeon with multiple webapp

LightInTheBox - Buy quality products at wholesale price