Hi ,

I see following stuck threads in openJPA code :

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

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: 
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6423457

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 ) ?

Regards,
Ravi.

--
View this message in context: 
http://openjpa.208410.n2.nabble.com/Stuck-threads-at-Schema-getTable-tp6213602p6213602.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to