Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JVM hang situation in java.sql.DriverManager

843829Dec 22 2005 — edited May 23 2007
Hi,

java.sql.DriverManager is a class with all static synchronized methods exposed.

During troubleshooting a hand situation, I came across the threadumps which indicated that one thread was holding a monitor of type java.lang.Class, in DriverManager.getConnectionMethod, essentially not getting a connection to the database.

However there were bunch of threads which were waiting for this monitor (java.lang.Class), in different methods of DriverManager class. e.g. DriverManager.registerDriver() method.

Question here is, when a static synchronized method (say M1) of a class is in execution, does JVM block calls to any "other" static synchronized methods (say M2, M3) in that class, until first method viz. M1 is complete?

JVM version was 1.4.1_03

Thanks and Rgds,
Santosh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2007
Added on Dec 22 2005
6 comments
413 views