Deploying log4.properties within ear

Problem

Putting log4.properties file to ear/lib/ is not sufficent for log4 configuration file to be registered on the ear’s classpath.

Solution

Add log4.properties to a jar file, e.g. log4j.properties.jar, which is itself put to ear/lib.

Content of jar may be just /log4j.properties.