You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org> on 2006/09/06 10:35:22 UTC

[jira] Created: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
----------------------------------------------------------------------------------------------------

                 Key: JDO-419
                 URL: http://issues.apache.org/jira/browse/JDO-419
             Project: JDO
          Issue Type: Bug
          Components: tck20
    Affects Versions: JDO 2 final
            Reporter: Marc Prud'hommeaux
            Priority: Minor


The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".

The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-419?page=all ]

Craig Russell updated JDO-419:
------------------------------

    Attachment: JDO-419.patch

Please review this patch.

This patch uses a different flag, UNSPECIFIED, to bypass running the test. The semantic difference is that UNSPECIFIED means that the behavior is not specified, while IMPOSSIBLE means that the conditions for the test cannot be created. 

This allows us to update the life cycle table in the specification to be consistent.

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>         Attachments: JDO-419.patch, JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-419?page=all ]

Craig Russell reassigned JDO-419:
---------------------------------

    Assignee: Craig Russell

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>         Attachments: JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Ilan Kirsh (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-419?page=comments#action_12434343 ] 
            
Ilan Kirsh commented on JDO-419:
--------------------------------

Hi Craig,

Your last comment is very interesting. I didn't know that this is the new policy. Actually ObjectDB 2.0 supports dual mode - enhancement when available (but with no binary compatibility) and reflection as a backup for persistence capable classes that are not enhanced.

Currently, out of the 445 TCK tests that ObjectDB passes - 6 tests fail in reflection mode:

1. IsTransactionalFalse.testIsTransactionalFalse (access in line 86 is not detected)
2. MakeTransactionalPriorToTransactionRolledback.testTransactionalInst (modifications in lines 115, 117 are not detected)
3. InstanceLifecycleListenerLoad.testLoad (access in line 101 is not detected)
4. NoAccessToFieldsAfterPredelete.test (access in line 115, for instance, is not detected)
5. StateTransitions - as discussed in this issue.
6. WhenNontransactionalReadIsFalse.test (access in line 116, for instance, is not detected)

My plan was to offer the reflection mode as a non compatible extension, but if JDO can support reflection mode and these tests can be fixed it could be much better.

Regards, Ilan


> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>         Attachments: JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-419?page=comments#action_12434330 ] 
            
Craig Russell commented on JDO-419:
-----------------------------------

The patch is an elegant solution to the issue. 

The only other option is to require an exception to be thrown in case the implementation is BinaryCompatible, which would require a specification change. This would also require a more extensive change to the test. I'm not sure that it's worth it.

Other opinions?

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>         Attachments: JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-419?page=comments#action_12434333 ] 
            
Marc Prud'hommeaux commented on JDO-419:
----------------------------------------

My opinion is that it is useful to be left up to the vendor to decide whether to throw an exception or not (or only throw an exception if the field is hollow).

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>         Attachments: JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-419?page=comments#action_12434323 ] 
            
Marc Prud'hommeaux commented on JDO-419:
----------------------------------------

This also affects the "read field with active optimistic transaction" state list. Another way to fix it is to change elements 7 & 8 from ERROR to IMPOSSIBLE in both the "read field with active optimistic transaction" and "read field with active datastore transaction" arrays.

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>            Priority: Minor
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-419?page=all ]

Craig Russell updated JDO-419:
------------------------------

    Fix Version/s: JDO 2 maintenance release 1
                   JDO 2.0 TCK challenge fixes

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>             Fix For: JDO 2 maintenance release 1, JDO 2.0 TCK challenge fixes
>
>         Attachments: JDO-419.patch, JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-419?page=all ]

Marc Prud'hommeaux updated JDO-419:
-----------------------------------

    Attachment: JDO-419.patch

Attached is a patch to fix the incorrect state transition assertions.

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>            Priority: Minor
>         Attachments: JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-419?page=comments#action_12439956 ] 
            
Michael Bouschen commented on JDO-419:
--------------------------------------

The patch looks good!

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>         Attachments: JDO-419.patch, JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-419?page=all ]

Craig Russell resolved JDO-419.
-------------------------------

    Resolution: Fixed

svn commit -m "JDO-419 JDO-424 Changed state transition table to use UNSPECIFIED where the specification is unclear" trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java 
Sending        branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
Sending        trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
Transmitting file data ..
Committed revision 454538.


> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>             Fix For: JDO 2 maintenance release 1, JDO 2.0 TCK challenge fixes
>
>         Attachments: JDO-419.patch, JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-419) StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-419?page=comments#action_12434337 ] 
            
Craig Russell commented on JDO-419:
-----------------------------------

In JDO 1, it was a requirement to throw an exception to access a field other than the primary key field in a deleted instance. We changed it in JDO 2 to accommodate implementations that didn't get control on each field access (reflective implementations).

> StateTransitions incorrectly asserts that field access in a deleted instance will throw an exception
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JDO-419
>                 URL: http://issues.apache.org/jira/browse/JDO-419
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Marc Prud'hommeaux
>         Assigned To: Craig Russell
>            Priority: Minor
>         Attachments: JDO-419.patch
>
>
> The series of states marked with "read field with active datastore transaction" (element 14 of the "transitions" field of org.apache.jdo.tck.lifecycle.StateTransitions) asserts that accessing a field of a deleted instance will throw an exception. However, this is not mandated by the spec, only suggested that it might happen. Section 5.5.6 reads: "Any other access to persistent fields is not supported and might throw a JDOUserException".
> The only easy fix is to just remove the "read field with active datastore transaction" test specifications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira