Dan O'Connor <[EMAIL PROTECTED]> writes:

>Tyler Jewell, the BEA training director for Java and XML
>technologies, yesterday published an article called "What's Wrong
>with the EJB 2 Specification" at
>http://www.onjava.com/pub/a/onjava/2001/02/28/ejb.html. In this
>article, he identifies "dependent objects" as what is wrong with the
>EJB 2 specification.

Good article. I do agree that Tyler's objections are misplaced.

>First, I would like to correct what I believe was a fairly basic
>technical mistake in Tyler's article. He says, "Dependent objects
>don't require primary keys." I would like to suggest that the
>opposite is the case, and I cite from 9.4.4.1 in the spec (proposed
>final draft): "The dependent object class instance must have a
>primary key value that is unique across all instances of the
>dependent object class."

This is a mistake in the spec rather than the article -- dependent objects
should not have an identity of their own else they would no longer be
dependent. If you use a relational model to color your perception of the
world, a dependent object may or may not have its "own" (i.e. not composed
from the keys of its parent) primary key. Some data modeling methodologies
recommend creating a unique physical key for each and every entity, a
practice I don't subscribe to. On the other hand if you think in terms of
objects, a dependent object belongs to the parent and therefore cannot have
an identity other than that of its parent.

I think the spec should provide support for dependent objects with a primary
key but not require it.

The rest of Dan's comments are right on target.

Alex Smith
Insight LLC
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.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".

Reply via email to