If your PK's superclass is Object, that hashcode won't work because it
is based on the reference address. The error message is a bit decieving,
basically, what the verifier is doing is checking that the method exists
_and_ that it behaves properly: it creates two identical PK's and makes
sure that their hashCode methods return the same value.

David Wade wrote:
> 
> JBoss 2.1-beta
> 
> I am trying to use a PK class with a BMP entity bean.  I have overridden
> hashCode() as required but when I re-deploy I still get the message
> 
> [Verifier]
> Bean   : Resource
> Section: 9.2.9
> Warning: The primary key class must override hashCode().
> 
> My v.lazy hashCode() looks like
> 
>   public int hashCode()
>   {
>     return super.hashCode();
>   }
> 
> Any ideas anyone?
> 
> thanks.
> 
> David Wade                   Phone : +64 9 309 7918
> Optimation NZ Ltd            Fax   : +64 9 309 7919
> 43 College Hill              DDI   : +64 9 307 5561
> PO Box 106104                Mobile: +64 21 253394
> Auckland                     Email : [EMAIL PROTECTED]
> New Zealand                  Web   : http://www.optimation.co.nz
> 
> NOTE: This electronic mail message together with any attachments is
> confidential. If you are not the intended  recipient, please e-mail us
> immediately and destroy this message. You may not copy, disclose or use the
> contents in any way. Thank you.

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to