openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravi P Palacherla <>
Subject Stuck threads at Schema.getTable.
Date Mon, 28 Mar 2011 03:06:34 GMT
Hi ,

I see following stuck threads in openJPA code :

 java.lang.Thread.State: RUNNABLE 
   at java.util.TreeMap.getEntry( 
   at java.util.TreeMap.get( 
   at org.apache.openjpa.jdbc.schema.Schema.getTable( 

I think the root cause of the issue is because of unsynchronized TreeMap.

There is a sun issue that explains the same about a hashMap and I think this
is also because of the same issue explained in:

So, the fix is to synchronize the TreeMap but I do not have a replicable
test case.

I created a simple testcase that will create around 100000 treeMap entries
and then around 50 threads trying to access this treeMap but unable to
replicate the issue.

Please suggest what you think should be done.
Can I just submit the code fix ( synchronizing the treemap) and the test
case ( even though unable to replicate ) ?


View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message