[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-security-dev
Subject:    Logging issue with XMLSec, commons-logging, and Metro
From:       Gerardo_Nevárez_Moorillón <gnevarez () gmail ! com>
Date:       2009-09-08 16:49:57
Message-ID: 9969f8f90909080949s1737fa92m9f5c36594292b6bd () mail ! gmail ! com
[Download RAW message or body]

Hi all,
Related to Torsten issue, I'm using Java5 with Tomcat as App Server, and I
use the Metro WS Stack in the WEB-INF/lib folder as well (v 1.4).

I have to use Canonicalization (sp?) 1.1, to sign data inside a WS operation
(not using WSS though), I pushed for1.0 Excl, but it wasn't my call (govnmt.
specs :) ). I'm using the endorsed mechanism, so that XMLSec has guaranteed
precedence over Metro, and, as far as the Signature is related this works
OK, and is a workable path on our migration to Java6 and have Canon. 1.1
available.

My issue is with Commons Logging. Since CL has to be in the endorsed
classpath, all the applications and frameworks that use CL go through there,
and I haven't figured out a way to configure CL for each application
separately. What happens now is that the logging done in CL in all
applications, is going to stdout.

I'm using log4j as the final (or destination?) logging mechanism, and gets
configured by each webapp in a listener (Spring's Log4jConfigListener)

Using the CL config properties in the WEB-INF/classes folder does not work
reliably, there seems to be a singleton in CL, so, even if I include log4j
in endorsed, each web  application re-configures Log4j, and all the CL
logging goes to the latest loaded log4j configuration.


Any experiences/ideas on how to configure xmlsec/CL to work in this
scenario?


I worked around it patching xmlsec internally, and switching to slf4j, I
then place the patched xmlsec and the slf4j api in endorsed, the simple
slf4j impl. in $tomcat/common/lib, and the slf4j delegation-to-log4j jar in
the webapp WEB-INF/lib folder.

But it feels like a hack, and I will have to update xmlsec later on, any
better ideas?

Gerardo

[Attachment #3 (text/html)]

Hi all,<div><br></div><div>Related to Torsten issue, I&#39;m using Java5 wi=
th Tomcat as App Server, and I use the Metro WS Stack in the WEB-INF/lib fo=
lder as well (v 1.4).</div><div><br></div><div>I have to use Canonicalizati=
on (sp?) 1.1, to sign data inside a WS operation (not using WSS though), I =
pushed for1.0 Excl, but it wasn&#39;t my call (govnmt. specs :) ).=C2=A0I&#=
39;m using the endorsed mechanism, so that XMLSec has guaranteed precedence=
 over Metro, and, as far as the Signature is related this works OK, and is =
a workable path on our migration to Java6 and have Canon. 1.1 available.</d=
iv>
<div><br></div><div>My issue is with Commons Logging. Since CL has to be in=
 the endorsed classpath, all the applications and frameworks that use CL go=
 through there, and I haven&#39;t figured out a way to configure CL for eac=
h application separately. What happens now is that the logging done in CL i=
n all applications, is going to stdout.=C2=A0</div>
<div><br></div><div>I&#39;m using log4j as the final (or destination?) logg=
ing mechanism, and gets configured by each webapp in a listener (Spring&#39=
;s=C2=A0Log4jConfigListener)</div><div><br></div><div>Using the CL config p=
roperties in the WEB-INF/classes folder does not work reliably, there seems=
 to be a singleton in CL, so, even if I include log4j in endorsed, each web=
 =C2=A0application re-configures Log4j, and all the CL logging goes to the =
latest loaded log4j=C2=A0configuration.</div>
<div><br></div><div><br></div><div>Any experiences/ideas on how to configur=
e xmlsec/CL to work in this scenario?</div><div><br></div><div><br></div><d=
iv>I worked around it patching xmlsec internally, and switching to slf4j, I=
 then place the patched xmlsec and the slf4j api in endorsed, the simple sl=
f4j impl. in $tomcat/common/lib, and the slf4j delegation-to-log4j jar in t=
he webapp WEB-INF/lib folder.</div>
<div><br></div><div>But it feels like a hack, and I will have to update xml=
sec later on, any better ideas?</div><div><br></div><div>Gerardo</div>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic