Perhaps lists that are specific to one entity should be included in the
entity business logic.  However, summary data or reporting data spans
entities and is not reusable across scenarios should not be in the entity
bean (or its home).  Why would you encapsulate a summary in the entity bean
if it is only used in one scenario?  What is the value of that besides
creating hopelessly bloated entities. If you use direct database access to
produce a summary from a session bean, then you are encapsulating that
behavior in the session. I realize that my approach breaks persistence
independence, but come on. Were also trying to make systems that perform.

-----Original Message-----
From: Ian McCallion [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 13, 1999 8:46 AM
To: [EMAIL PROTECTED]
Subject: Re: findLargeAccounts - why bother?


Richard Monson Haefel wrote:

>I have a different view point from Ian's.  Most listing and summary data
is
>propriate strategy for 3 reasons: 1) Its more peformant to
access
>the database directly for read-only listing and summary data.  2)
Encapsulation
>is achieved through the session bean (to say its not is to say that entity
bean
>encapsulation is some how superior), 3) most listing and summary needs are
not
>reusable and should therefor not reside in the entity bean.

I must have higher aims for encapsulation than Richard! To me
"encalsulating" the data inside two beans is not encapsulation.

Also, I believe that summary extraction will quite often be reusable.
Indeed one could imaging providing a general query service in which the
selection criteria and fields needed could be passed as parameters.

Ian McCallion



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