On Jan 3, 2006, at 1:50 AM, Curt Arnold wrote:


On Jan 3, 2006, at 1:05 AM, Jacob Kjome wrote:

I don't see this happening quite so much as with the RepositorySelector interface, which did change between 1.2 and 1.3. The changes are somewhat important for 1.3's usage... at least it used to be. I haven't tracked all the recent changes. I hope the recent changes don't blow away stuff like self-logging and improvements to repository selectors.

Jake

Looks like RepositorySelector poses a similar problem as LoggerRepository. From my analysis of the code, it does appear that the intention was to allow clients to specify their own RepositorySelector and the following page gives an example of implementing a log4j 1.2 RepositorySelector for a JBoss app (http:// www.jboss.org/wiki/Wiki.jsp?page=Logging).

http://jira.jboss.com/jira/browse/JBAS-1853 is a JBoss JIRA issue suggests that at least that user attempted to implement a log4j 1.2 LoggerRepository.

My understanding is that if an app that implemented the log4j 1.2 version of LoggerRepository or RepositorySelector passes that object into log4j 1.3 then any attempt to call one of the log4j 1.3 introduced methods would raise an unchecked NoSuchMethodException. In the case of LoggerRepository, I put if(repo instanceof LoggerRepositoryEx) guards around any calls to the new methods and attempted to implement reasonable fallback behavior. I have not looked at RepositorySelector and do not know how reasonable it would be to implement acceptable fallback behavior if presented with a 1.2.x implementation of RepositorySelector.


This thread went quiet without a clear resolution. The sites listed seem to be very compelling evidence that some users (particularly within JBoss apps) will have implemented log4j 1.2's RepositorySelector and LoggerRepository interfaces and I suspect that they would not be happy if their apps started crashing with NoSuchMethodException's if they updated to log4j 1.3.

I think it would be good to split RepositorySelector into a log4j 1.2 compatible interface and an extended interface as was done with LoggerRepository. I intend to investigate in the next few days and will report to the list before committing, but wanted to give the list a heads up.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to