Reset Classloading using Micro Container Beans in JBoss EAP 5

Solution Verified - Updated -

Issue

  • While using a separate log4j configuration to create application log files. The container is configured to isolate ear deployments. Deployment is successfull and logging works basically with its own log4j.xml.

However, there exist some (required) libraries in ear deployment that also contains a log4j.xml. So it randomly takes a log configuration and many times it is the wrong one resulting in a missing log.

Is there a way to control the search order that my log4j.xml will be found first beforce 3rd party configurations will be used?

I tried the following locations withing the ear file but without success:
- .EAR/META-INF/log4j.xml
- .EAR/log4j.xml
- .EAR/lib/log4j.xml
- .EAR/ejb-module.jar/log4j.xml

Environment

  • JBoss Enterprise Application Platform (EAP)
    • JBoss EAP 5.x.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content