Folks,

I have 2 entity beans: Organisation and Contact. Both use BMP (I prefer CMP
but have no choice in the matter).
An Org can have many Contacts.


Having read the Sun tutorial
(http://java.sun.com/j2ee/tutorial/doc/BMP3.html#63324) and Kyle Brown's
excellent paper on Session Bean facades
(www7b.boulder.ibm.com/wsdd/library/techarticles/0106_brown/sessionfacades.h
tml) I am still slightly unsure on how to model it.


Should the Contact primary keys be retrieved by the Organisation Entity Bean
as described in the Sun tutorial? i.e. The Organisation Entity Bean is aware
of the Contact Entity Bean and accesses it.

Or should an Object Factory handle this relationship, leaving the
Organisation Entity Bean unaware of the Contact Entity Bean?

Or doesn't it matter?



2. Should the Organisation Value Object contain only the primary keys of the
contained Contacts, leaving the client to retrieve the Contact Value Object
when it sees fit?

Or should the Organisation Value Object contain instances of Contact Value
Objects, presumably constructed by the Object Factory?


Any recommendations gratefully received....


Cheers - Adam

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