
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
23/Apr/06 01:56 AM
|
|
org.apache.jdo.tck.lifecycle.PMsCanSharePCClassesButNotPCInstances hangs. It is curently commented out in test/conf/alltests.list so that the TCK will run to completion.
|
|
Description
|
org.apache.jdo.tck.lifecycle.PMsCanSharePCClassesButNotPCInstances hangs. It is curently commented out in test/conf/alltests.list so that the TCK will run to completion. |
Show » |
made changes - 25/May/05 01:11 AM
| Field |
Original Value |
New Value |
|
Assignee
|
|
Michael Watzek
[ mwa
]
|
made changes - 10/Jun/05 01:51 AM
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
|
Resolution
|
|
Fixed
[ 1
]
|
made changes - 01/Nov/05 06:57 AM
|
Status
|
Resolved
[ 5
]
|
Closed
[ 6
]
|
made changes - 23/Apr/06 01:53 AM
|
Resolution
|
Fixed
[ 1
]
|
|
|
Status
|
Closed
[ 6
]
|
Reopened
[ 4
]
|
made changes - 23/Apr/06 01:56 AM
|
Resolution
|
|
Fixed
[ 1
]
|
|
Fix Version/s
|
|
JDO 2 beta
[ 12310683
]
|
|
Status
|
Reopened
[ 4
]
|
Closed
[ 6
]
|
|
When such a thread makes an object persistent, it increases a counter. After its transaction has finished, it checks that counter and sleeps until the counter equals 5.
Unfortunately, the code is not prepared for exceptions thrown while transactions are executing. In such cases, the counter is not increased and all threads wait forever.
The the exception is a SQL exception indicating that a database table is missing:
ERROR 42X05: Table 'STATETRANSITIONOBJ' does not exist.
In addition, the .orm files are missing for datastore identity and application identity. Furthermore, the .jdo file for application identity is buggy.
These are the changes of the fix:
0) schema1.sql, schema2.sql
0.1) Database tables are added.
1) PMsCanSharePCClassesButNotPCInstances.java
1.1) Method "test" is split into two methods "testSharedPC()" and "testNonSharedPC()".
1.2) A check for uncaught exceptions is added causing a test to fail or throw a JDOFatalException in case of failures or errors. Without this check both tests would always succeed, even if there are failures and/or errors.
1.3) The call for increasing the counter for thread synchronization is moved into a finally block.
1.4) The call "pm.getExtent" is executed inside a transaction due to non-transactional read exception.
2) StateTransitionObj.java
2.1) A private static field "counter" is added.
2.2) A private field "id" is added. This is the PK field in case of application identity.
2.3) The no-arg constructor sets field "id to "++counter".
2.4) The second constructor calls "this()";
2.5) Getter/setter for field "id" are added.
2.6) A public static class "Oid" is added. This class is the object id class in case of application identity.
3) alltests.list
3.1) Class "PMsCanSharePCClassesButNotPCInstances" is added.
4) StateTransitionObj.jdo (for application identity)
4.1) An attribute "objectid-class" is added to class "StateTransitionObj".
4.2) The identity type is changed to application identity.