Question on TCK11
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > Question on TCK11




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Question on TCK11  
Geoff hendrey


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-06-05 12:49 PM

Department.hashCode method is using a persistent field
to compute the value of the hashcode, in TCK11. Note
that in the Sun version of the TCK, which JDOMax
passes, hashCode is NOT overidden for Department.

I think it is wrong to override hashCode and equals
for any class using datastore identity. This was the
subject of 35 or so emails on the experts group, and
this was the position espoused by Craig.

Craig laid down the law:
"If you don't have a set of fields that uniquely form
an application identity, then you should not implement
equals. You *should* delegate to Object.equals"

Please let me know if an implementation is expected to
handle cases when the user overides equals and
hashCode for datastore identity? Certainly, JDOMax
does NOT, and is failing a good bit of the Apache
TCK11 because of it!

-geoff



__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail






[ Post a follow-up to this message ]



    Re: Question on TCK11  
Craig Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-06-05 12:49 PM






[ Post a follow-up to this message ]



    Re: Question on TCK11  
Craig Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-06-05 12:49 PM






[ Post a follow-up to this message ]



    Re: Question on TCK11  
Geoff hendrey


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-06-05 12:49 PM


> The classes in question have a set of fields that
> uniquely form an
> application identity, and hashCode and equals use
> these fields. I don't
> see the issue.

DatastoreIdentity is used, so no, they don't form an
application identity.

-geoff








Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html







[ Post a follow-up to this message ]



    Re: Question on TCK11  
Geoff hendrey


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-06-05 12:49 PM

The test in question used DatastoreIdentity.

you said:

"The classes in question have a set of fields that
uniquely form an *application identity*" and I'm just
saying no, they don't form an *application identity*,
because this test doesn't use application identity. It
uses Datastore Identity.

Ho hum, I guess I'm just grumpy because I didn't
expect the Apache TCK to be so different from the Sun
TCK.

-geoff


--- Craig Russell <Craig.Russell@Sun.COM> wrote:

> Hi Geoff,
>
> It sounds like you are confusing application
> equality with JDO
> identity, which are two separate concepts.
>
> JVM has identity that you test with a == b.
>
> Applications have equality that you test with
> a.equals(b).
>
> JDO has identity that you test with
> a.getObjectId().equals(b.getObjectId()).
>
> Three different concepts.
>
> Craig
>
> On May 21, 2005, at 6:37 PM, Geoff hendrey wrote:
> 
> an 
> the weekend. Check 
> Craig Russell
> Architect, Sun Java Enterprise System
> http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>




Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online and more. Check it out!
http://discover.yahoo.com/






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:45 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register