No, adding BMP code to a CMP object is not portable at all, infact some
containers may not support this.
Either code order as a single BMP entity, in which case it can manage all of
the order and order line items.
Or, code order as a CMP entity which uses additional line item CMP entity
beans.
The BMP entity bean allows complete flexability dealing with the data base,
speed, and returnes a single object which represents an entire order.
The complete CMP method offers better portability (not perfect as deployment
is still unique to each environment), and descrete objects to represent
order and order line items which in turn allows business logic to remain in
the session beans.
However, the correct approach might be to use an object database (such as
GemstoneJ and others).

-----Original Message-----
From: Tom Jordan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 09, 1999 9:54 PM
To: [EMAIL PROTECTED]
Subject: Persisting Dependant Data


Hi,

I was hoping i could get some suggestions from people on how to best handle
the issue of persisting data. For discussion purposes, lets use Order and
Order line items.  I have modeled Order as a CMP based entity bean.  From
previous posts in the archives I gather that dependant data should not be
modeled as entity beans.  In which what is the suggested design for
persisting and loading the line items. What i have been doing thus far is
adding the persistence code to the entity bean and let it control the
dependant object. Is this the right way of doing things?

The thing that i don't like about that approach is that the Order bean has
the flexibility of having its data source changed without impact to the
component. If the component now contains hand coded persistance code, it
then become unportable.  I would be very keen on knowing how is the best way
to approach this common problem.

thanks in advance.
Tom

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.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".

Reply via email to