Hi Richard,
The implemenation for the java.util.Set and java.util.Collection comes from
the application Vendor. So the uniquness will be provided through the
implemenation of the Set Interface which by definition will have only unique
values.
Amit Khanna.
Pramati Technologies.
----- Original Message -----
From: Richard Monson-Haefel <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 6:32 PM
Subject: EJB 2.0: Semantics of Set relationship type
> The java.util.Set collection type is supposed to ensure that objects in
> the collection are unique. (In EJB 2.0 uniqueness in a Set is based on
> the entitys' primary keys. ) However, the specification doesn't require
> that the container enforce uniqueness. So, for example, as a bean
> developer I might specify Set as the cmr-field-type, but the underling
> EJB container and database may not actually enforce this.
>
> Section 10.3.6.2 states "The semantics of a set accessor method, when
> applied to a collection-valued cmr-field, is also determined by the
> referential integrity semantics associated with the multiplicity of the
> relationship." This would seem to imply that it's not entirely the
> container's responsibility to enforce the uniqueness constraint on Set
> cmr fields. In fact, EJB vendors may choose not to enforce it at all,
> leaving it in the hands of the database and the referential integrity
> defined for that data.
>
> I'm wondering what vendors think about this. Obviously, Section 10.3.6.2
> has a variety of implications, which are important to all relationship
> fields -- but lets keep this thread a least focused on the use of Set.
>
> Thanks,
>
> Richard
> --
> Richard Monson-Haefel
> Author of Enterprise JavaBeans, 2nd Edition (O'Reilly 2000)
> Co-Author of Java Message Service (O'Reilly 2000)
> http://www.jMiddleware.com
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".