Is it true that it may not throw the IllegalMonitorStateException if it owns the monitoring,
First we look up the exception in the Java API documentation:
public class IllegalMonitorStateException extends RuntimeException Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
The exception is thrown to indicate the thread does not own the monitor. Therefore, if the exception is thrown, the thread does not own the monitor. Therefore, if the thread owns the monitor, the exception will not be thrown.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com