File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

use of commons-logging under was 5.0

 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I try to use commons-logging inside my application to generate custom log files. As far as I see, WAS 5.0 use commons-logging for his own logging and register a custom LogFactory in the ws-commons-logging.jar.
How is it possible to change the factory to Log4J without changing the WAS logging? I try it on my own, but there are serveral problems with starting websphere, after changing the factory.
Thank you
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe Benoit solved that problem in this thread.
Please let us know if that fixes your problem.
Kyle
 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Kyle.
 
Sean Sullivan
Ranch Hand
Posts: 427
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Integrating Jakarta Commons Logging with IBM WebSphere Application Server V5
http://www-1.ibm.com/support/docview.wss?uid=swg27004610
 
David Hibbs
Ranch Hand
Posts: 374
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kyle et. al:
Thanks for the information on the logging solution, but it doesn't work.
Per the referenced document:
"Caviat: this solution is sensitive to changes regarding WebSphere's employment of the commons-logging.properties file to integrate the TrLog feature. If future versions of WebSphere utilize the ´┐ŻLogFactory file to specify the TrLogFactory implementation, this solution will be ineffectual unless PARENT_LAST classloader delegation is also employed. The following sections discuss the warrant for using PARENT_LAST classloader delegation. "
The key is this: WAS v5 ALREADY uses the commons-logging.properties file to integrate the TrLog feature! I tried both the EAR and WAR solutions provided/recommended and neither worked without the PARENT_LAST setting.
To see for yourself, pop open AppServer/lib/ws-commons-logging.jar and peek at the content of commons-logging.properties. It points to the TrLogFactory. Because this is on the core server classpath, it cannot be overridden without a file before it on the classpath, which is impossible to do without the PARENT_LAST setting.
--David
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic