Hi,
JIRA JDO-13 was filed because a TCK test hangs
(org.apache.jdo.tck.lifecycle.PMsCanSharePCClassesButNotPCInstances).
That TCK test starts 5 concurrent threads. Each thread makes an object
of class "org.apache.jdo.tck.pc.lifecycle.StateTransitionObj" persistent
in a separate transaction. Afterwards, each thread waits for the other
threads to finish their transactions. After each threads has finished
its transaction, all threads continue execution.
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.
After I fixed this in my workspace, the exception points to the problem:
ERROR 42X05: Table 'STATETRANSITIONOBJ' does not exist.
The files schema1.sql and schema2.sql do not contain that table.
Furthermore, I cannot find a .orm file in
org/apache/jdo/tck/pc/lifecycle package for that class - neither for
datastore identity nor for application identity.
There are .jdo files for both identities. Confusingly, the .jdo file for
application identity says datastore identity. I'm not sure if this is a
bug, as class "org.apache.jdo.tck.pc.lifecycle.StateTransitionObj" has
only two fields and, because of the field names, only one of them seem
to be persistent:
private int int_field;
private transient int nonmanaged_field;
However, the .jdo files say that both are persistent. Probably, these
files do not comply to TCK20 conventions, as they are no package jdo files?
If it is only one field which is persistent, do we have a problem with
application identity? In that case, the field must be the PK.
Summerizing, in addition to the fix in the test code we need to
1) fix the SQL schema
2) add the missing .orm files
3) fix the .jdo files
Eric, Andy, Michelle:
I'm not sure, if the schema is autogenerated or if schema1.sql and/or
schema2.sql is used. Can one of you fix the schema issue?
Craig:
I'm not sure which fields of class
"org.apache.jdo.tck.pc.lifecycle.StateTransitionObj" are persistent. Can
you also help on the application/datastore issue? Is it reasonable to
define a second persistent field?
Thanks,
Michael
--
-------------------------------------------------------------------
Michael Watzek [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED] Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------