>
> Hi,
>
> from the 2.0 spec 4.1.2 Flexible component model:
>
> "Enterprise beans that are remotely accessible components are
> intended to be
> relatively coarse-grained business objects...Fine-grained
> objects (e.g.,
> line item on a purchase order, employee's address) should not
> be modeled as
> remotely accessible enterprise bean components, but rather as locally
> accessible enterprise beans or as the dependent classes of enterprise
> beans."
>
> I have a few related questions:
>
> * which is the preferred way? to use local entity beans or to
> use dependent
> classes, i.e., will the overhead of local entity beans be
> small enough to
> model  most of your domain objects as local entity beans.

I would recommend local interfaces, which make CMP/CMR easier/possible
(depending on your vendor), and also improves reuse.

> * since we "always" access entity beans through remotely
> accessible session
> beans when would we ever make an entity bean non local (or am I not
> understanding what local entity beans really are)

Never, in your case.

> * for ejb 1.0 and 1.1 all app servers i know optimize calls
> in the same
> jvm...so we can think of entity beans within the same jvm as
> "local." how
> much less overhead do these optmizations provide? i.e.,
> because of these
> optimizations can we model fine grain objects in ejb 1.1. as
> entity beans
> (contrary to the 1.1 specs recommendation) ?  there's probably a
> philosophical debate here, but that aside, if i wanted to
> model address and
> line item in ejb 1.1 can it be reasonable done without
> performance kill.
>

While some vendors do optimize such calls, the pass-by-value semantics of
remote calls forces them to either

  o deep-copy arguments and return values, or
  o pass by reference and potentially break your beans

Pass by reference is much faster and conserves memory too, but it means
tightly coupled applications.


> I've tried searching the archives but can't seem to fine these answers
> readily.  Much thanks.
>
HTH

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