Issue Details (XML | Word | Printable)

Key: JDO-238
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Martin Zaun
Reporter: Michael Bouschen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Timing bug in TCK test case ThreadSafe

Created: 09/Dec/05 07:33 PM   Updated: 10/Mar/06 04:15 AM
Return to search
Component/s: tck11, tck2
Affects Version/s: JDO 2 beta
Fix Version/s: JDO 2 final

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works ThreadSafe.java 2006-03-09 04:28 AM Martin Zaun 7 kB
File Licensed for inclusion in ASF works ThreadSafe.java.diff 2006-03-09 04:28 AM Martin Zaun 9 kB

Resolution Date: 10/Mar/06 04:05 AM


 Description  « Hide
The TCK test ThreadSafe runs multiple threads, where each thread tries to persist the same pc instance using its own PM. The expected behavior is that one thread succeeds persisting the pc instance and stores it at transaction commit. All other threads should result in a JDOException because the pc instance is already bound to a different PM. All threads close the PM at the end.

Now, it might happen that the succeeding thread closes the PM before a parallel thread tries to persist the pc instance. The behavior of pm.makePersistence for a pc instance bound to a closed pm is not specified, so it does not necessarily result in an exception.

The test case should be changed such that the succeeding thread waits for all the other threads before closing the PM. Please note, the solution must be robust enough to avoid a deadlock situation even if an erroneous JDO implementation would allow multiple threads to succeed persisting the pc instance.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #384593 Thu Mar 09 20:03:10 UTC 2006 mzaun JDO-238 - fixed TCK test case ThreadSafe
Files Changed
MODIFY /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/persistencemanager/ThreadSafe.java