Ceki Gulcu commented on New Feature LOGBACK-719
Reasons 1 and 2 make sense. I don't understand reason 3. If the pluggable class loader mechanism returns the appropriate class, it does not matter which classloader or which bundle it came from.

Anyway, let's say that we go for an object factory with the capability to load classes as well. Here is a tentative interface:

interface ComponentFactory {
  Class loadClass(String className);
  Object getInstance(String className);
}

The are two alternatives for registering a ComponentFactory.

1) Register a ComponentFactory instance directly with the context. Example:

  MyComponentFactory myComponentFactory = new MyComponentFactory();
  LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
  lc.setComponentFactory(myComponentFactory);

2) Register a ComponentFactory class in the configuration file:
 
  <configuration>
    <componentFactory class="com.acme.MyComponentFactory "/>
    ....
  </configuration>

The second approach suffers from the same problem that it tries to solve. MyComponentFactory may need to be loaded by a class loader unreachable by logback's own class loader.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira