Laird Nelson wrote:

> Richard Monson-Haefel wrote:
> > 2.  Does the business object have meaning by itself.
> > If the business object has meaning independent of any other business object then
> > it an entity bean. If it doesn't have meaning outside other business objects it
> > should be a dependent object.  An address, for example, only has meaning when
> > associated with some kind of entity.  A person, place or thing. It makes sense
> > to lookup the address of an organization or person, but under what circumstances
> > would you look up an address for its own sake?  Generally you wouldn't.
>
> I'm not picking holes; I'm genuinely curious: what about the address of,
> say, an Order?  Or is that another example of an address being
> "associated with some kind of entity"?  What if that address is picked
> from a list of possible addresses a person can choose from, that they
> maintain?

An Order becomes a record of a historical event at some point, so the address
information is not shared, because it represents, for example, the address that must
be billed or shipped to.  You don't want this type of data changing over time, because
it represents the address that was billed or shipped to at the time the Order was
processed. In this case I wouldn't share the Address info; It would be a dependent
object of the Order. It must be a copy of the address information because eventually
the order becomes immutable -- after it is successfully processed.

- Richard
--
Author of Enterprise JavaBeans
Published by O'Reilly & Associates
http://www.EjbNow.com

EJB FAQ
http://www.jguru.com/faq/EJB

===========================================================================
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