Please bear with me, this may not seem like a ejb/j2ee question at first, but is very relevent to application container development.
We are doing thread dump performance analyses of our production application servers and find the majority of our threads (say, 40 out of 50) are in wait states, waiting on the constructor or an accessor (getYear, getMonth, etc..) of java.util.Date.
After jad'ing the class, I discover all these methods and constructors are synchronized on a static member variable, Calendar staticCal.
I am sure a lot of people use java.util.Date as a field in their data beans, or invoke JDBC ResultSet.getTimestamp() which eventually constructs a java.util.Date, and have seen this problem before, where in a multi-threaded environment the majority of their threads are blocked on Date. Is there a way around it, short of spinning our own Date class? Thanks.
Gene
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail
