Niclas, Just one more word. I hope I have assessed this correctly. Really the last thing I want to do is to create erroneous problem reports. So, if I'm wrong on this please accept my apologies
Al -----Original Message----- From: Niclas Hedhman [mailto:[EMAIL PROTECTED] Sent: Saturday, March 05, 2005 3:34 AM To: Log4J Developers List Subject: Re: Appender, ErrorHanlder fail over deadlock On Saturday 05 March 2005 02:40, Harper, Allen (AHARPER) wrote: > In a nutshell heres whats happening. The entire instance of the logger > is syncronized. (Actually the syncronized object is the Category > object from which the Logger is derived.) A caller makes a log call > Log.xxxx(), in this case the JDBC appender. If the database is down > the DB call throws which in turn calls the errorHandler, which in turn > calls back into the Logger (deadlock) to swap out the primary and > backup appenders. I am on the same line of thinking that Ceki... How can you say that a single thread makes a deadlock?? This will not block; public class Test { private int m_counter = 10; public void doSomething() { synchronized( this ) { while( m_counter-- > 0 ) doSomething(); } } static public void main( String[] args ) { Test t = new Test(); t.doSomething(); } } so another thread is involved somewhere in your case. Hitting Ctrl-Break (Windows) or Ctrl-\ (Linux) will give you a stack dump with the monitors acquired and waited upon. Cheers Niclas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]