My project is packaged as an EAR file containing the SLF4J API (1.7.5), as well as log libraries as its implementation ( logback-core 1.0.13 and logback-classic 1.0.13 ).
When I (used) deploy my project SLF4J LoggerFactory finds the login as a possible binding and uses the correct registrar (i.e. the log).
Now I have a resource connector ( activemq-rar-5.8.0.rar ) that is deployed in front of my own EAR file (since EAR files require RAR). Unfortunately, this RAR contains its own implementation of SLF4J ( slf4j-api-1.6.6.jar slf4j-log4j12-1.6.6.jar log4j-1.2.17.jar ). RAR files use the log4j implementation.
When I deploy my EAR file, the LoggerFactory inside my application code suddenly uses the org.slf4j.impl.Log4jLoggerAdapter implementation ( org.slf4j.impl.Log4jLoggerAdapter ) - although I expected the class path to be separate from the RAR.
This is not like what I am doing wrong (RAR should use log4j, my EAR should use logback)?
Update 1: It doesn't seem like I'm alone , but unfortunately there is no answer.
Update 2:
Accordingly, GlassFish loads the connector module in front of the EAR / WAR files (which are the latest libs downloads).
Update 3:
I managed to fix the "binding": if I put slf4j-api-1.7.5.jar and the log implementation ( logback-core-1.0.13.jar and logback-classic-1.0.13.jar ) in the domains/<myDomain>/lib folder domains/<myDomain>/lib in GlassFish, the login will be used as an implementation of logging (see Update 2 - "Common Classloader" appears before "Connector Classloader").
Unfortunately, my configuration files are no longer found, as they are inside the WAR / EAR, which will later be loaded by another class loader ("Archive Classloader").
So this is not a solution for me, since I would like to save the log configuration files in EAR / WAR (since each application uses a different configuration).
Yours faithfully
stupidSheep