The model I described is the one you should be pursuing. And a good CMP
engine should allow you to persist a graph of objects. Sadly, not all
EJB servers can do that. It's a shame considering such solutions have
existed in the industry for years.

If your EJB server is one of the many that only persist one object to
one table, then you have to go around by either making all the objects
entity beans, or implementing ejbLoad/ejbStore in Order to deal with
PurchaseOrder. But in that case, you might as well do everything BMP and
save some performance.

The spirit of the EJB specs is very clear, it's just that not all EJB
servers fulfill the true needs that are not explicitly expressed in the
specs.

arkin


Nathan Phelps wrote:
>
> I understand what you are getting at here, however my main concern is that
> since a Purchase Order most likely represents data, it is going to have to
> know how to talk to the storage mechanism.  In other words, all the
> wonderful services EJB offers (like CMP) don't directly apply to the
> PurchaseOrder class because it doesn't implement the EntityBean interface.
> I will either have to code JDBC in the PurchaseOrder class or create data
> objects for the class to use.  This will definitely effect the portability
> of the object in my mind.  So how can I implement these "helper" classes
> without violating portability?
>
> Thanks,
>
> Nathan Phelps
> solarc.com
>
> > -----Original Message-----
> > From: Assaf Arkin [SMTP:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 18, 2000 9:48 PM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: Fine-grained  data in container managed entity beans
> >
> > public class Order
> >   implements EntityBean
> > {
> >    PurchaseOrder pOrder;
> >    Vector        lines;
> >
> >     . . .
> > }
> >
> >
> > public class PurchaseOrder
> > {
> > }
> >
> >
> > public class OrderLine
> > {
> > }
> >
> > arkin
>
> ===========================================================================
> 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".

--
----------------------------------------------------------------------
Assaf Arkin                                           www.exoffice.com
CTO, Exoffice Technologies, Inc.                        www.exolab.org

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