Rule Definition
Instead of being stick to a specific logging implementation, it is recommended to use the logging wrapper Jakarta commons-logging. It provides a Log interface that is intended to be both light-weight and an independent abstraction of other logging toolkits. It provides the middleware/tooling developer with a simple logging abstraction that allows the user (application developer) to plug in a specific logging implementation.
Remediation
Use SLF4J http://www.slf4j.org/index.html instead and configure it to use your specific logging implementation.
Violation Code Sample
import org.apache.log4j.*
Logger logger = Logger.getLogger("com.cast"); // VIOLATION
Fixed Code Sample
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Log log = LogFactory.getLog("com.cast"); // FIXED
Reference
http://www.infoq.com/news/2007/02/javaee-best-practices
Related Technologies
JEE
Technical Criterion
Architecture - Reuse
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.