db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Adams <matt...@matthewadams.me>
Subject Re: Spec updates for 2.3
Date Fri, 12 Mar 2010 17:50:48 GMT
No problem.  Wish I could be making the conf calls, but I've had daily
9 am scra (plural of scrum?) for the last year!  :(

On Fri, Mar 12, 2010 at 8:58 AM, Craig L Russell <Craig.Russell@sun.com> wrote:
> Hi Matthew,
>
> I agree the section needs to be rewritten. If there is an instance in the
> cache already, it might be in any state at all.
>
> It's only the case where an instance needs to be created that the
> specification should say what the state should be.
>
> Thanks for reading!
>
> Craig
>
> On Mar 12, 2010, at 8:43 AM, Matthew Adams wrote:
>
>> Hi all,
>>
>> I have a question about the following assertion regarding getting an
>> object by exact class with no validation.
>>
>> <craig>
>> 12.6.5:
>> If the validate flag is false, the user asserts that the instance
>> exists and the object id represents the exact class of the persistent
>> instance (specifically not a subclass or an interface):
>> A12.6.5-2 [If the object id represents an interface or abstract class,
>> JDOUserException is thrown.]
>> A12.5.6-2 [If there is already an instance in the cache with the same
>> JDO identity as the oid parameter, then this method returns it.]
>> A12.5.6-3 [There is no change made to the state of the returned
>> instance.]
>> A12.5.6-4 [If there is not an instance already in the cache with the
>> same JDO identity as the oid parameter, then this method creates an
>> instance with the specified JDO identity and returns it. If there is
>> no transaction in progress, the returned instance will be hollow or
>> persistent-nontransactional, at the choice of the implementation.]
>> A12.5.6-5 [If there is a transaction in progress, the returned
>> instance will be hollow, persistent-nontransactional, or
>> persistent-clean, at the choice of the implementation.]
>> </craig>
>>
>> Can you please tell me the state of the returned instance if there is
>> already an instance in the cache with the same JDO identity as the oid
>> parameter and the existing instance is not in any of the states
>> hollow, persistent-nontransactional, or persistent-clean?  A12.5.6-5
>> appears to me to state that the instance must be in one of these three
>> states.  It's not clear to me that A12.5.6-2 necessarily takes
>> precedence over A12.5.6-5.  The way it reads to me, it's almost as
>> though the presence of a transaction or not would cause the loss of
>> changes in the existing instance.  Maybe I'm off base, but I'd
>> recommend the following.
>>
>> <matthew>
>> A12.5.6-5 [If there is a transaction in progress, the returned
>> instance will be hollow, persistent-nontransactional, or
>> persistent-clean, at the choice of the implementation, unless there
>> was a transactional instance in the cache with the same JDO identity
>> as the oid parameter, in which case the there is no change made to the
>> state of the returned instance.]
>> </matthew>
>>
>> WDYT?
>>
>> -matthew
>>
>> On Thu, Mar 11, 2010 at 5:46 PM, Craig L Russell <Craig.Russell@sun.com>
>> wrote:
>> [snip]
>
> Craig L Russell
> Architect, Sun Java Enterprise System http://db.apache.org/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>



-- 
mailto:matthew@matthewadams.me
skype:matthewadams12
yahoo:matthewadams
aol:matthewadams12
google-talk:matthewadams12@gmail.com
msn:matthew@matthewadams.me
http://matthewadams.me
http://www.linkedin.com/in/matthewadams

Mime
View raw message