From SUN's java.lang.Object Javadoc:

wait
Causes current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed. The current thread must own this object's monitor.
notify
This method should only be called by a thread that is the owner of this object's monitor. A thread becomes the owner of the object's monitor in one of three ways: * By executing a synchronized instance method of that object. * By executing the body of a synchronized statement that synchronizes on the object. * For objects of type Class, by executing a synchronized static method of that class. Only one thread at a time can own an object's monitor.
notifyAll
Wakes up all threads that are waiting on this object's monitor. A thread waits on an object's monitor by calling one of the wait methods. This method should only be called by a thread that is the owner of this object's monitor.

So, in order to call wait(), I must have the object monitor... but at that moment my thread is blocked, so I can't release the monitor, so nobody can call notify() or notifyAll() on my object. What am I missing?

Update: I've something working, I'm still not sure why it works, I'll post the code later this evening

Update 2: as Chris Nokleberg mentionned, the monitor on the object is lost when wait is called, and this is written in the Javadoc... lost between other things. By the way, the description of wait(), wait(long) and wait(long, int) should be homogenous...