I don't see why the burdon is not put on the primary key implementor. Its
clearly documented in the spec that hashCode() and equals() are required for
client use, so why not leverage this? What do we do in the general case of
an
unkown primary key class(type = java.lang.Object)?

9.2.9 Entity bean's primary key class

The Bean Provider must specify a primary key class in the deployment
descriptor.

The primary key type must be a legal Value Type in RMI-IIOP.

The class must provide suitable implementation of the hashCode() and
equals(Object

other) methods to simplify the management of the primary keys by client
code.



----- Original Message -----
From: "marc fleury" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 10, 2001 3:38 PM
Subject: RE: [JBoss-dev] Fool proof? I think not.


> |> Why? Because Serialization includes the private state of the
> |> object. This is
> |> a perfectly valid PK which is not handled correctly by CacheKey. If the
> |> _hashCode value is marked as transient all works. The assumption being
> |> made by CacheKey is that the only ivars in the PK are its fields
> |> that define
> |> its identity.
>
> I see, so we must generate the cachekey values by serializing only the
> relevant fields.... pfffff here comes complexity.
>
> hmmmm
>
> marcf



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

Reply via email to