Hello All,

In the past we have pushed the concept of coarse-grained entity beans
because of the overhead of making fine-grained beans available over the
network and the assumed performance penalties associated with
fine-grained data access in light of managing concurrency, identity,
security and transactions.

I believe, however, that the new EJB 2.0 CMP programming model with
local interfaces will allow us to move to a much more granular model for
entity beans than we have advocated in the past.  As I have been working
on implementing an EJB container system, I have yet to find any real
technical challenges to allow entity beans to be very granular.  It
seems reasonable, for example, to allow entity beans to be as granular
as Addresses or Phone numbers. This flys directly in the face of past
recommendations by others and myself in particular.

The reason this is possible in EJB 2.0 CMP (I'm not talking about BMP )
is that the abstract programming model now makes it possible for the
container to use more performant mechanisms to mange persistence. For
example, lazy loading and optimistic locking strategies can be
implemented without a problem.  For relational databases, all you need
is a decent OR mapping facility.  For OODBMS (pretty rare in actual
deployments) the fit is even more natural.  With CMP over ERP you have
develop the beans with the ERP system foremost in your mind.  Of course
this is true of any backbend, but more so with ERP systems.  So
fine-grained entity beans may not be possible here.

The new abstract persistence model allows vendors to optimize database
access and supports a finer grained component model. The introduction of
local interfaces restrict the use of the bean within the same JVM and
enforce semantics of pass by reference as opposed to value (we could do
it before but now its official) and this seems to further improve
performance and allow for more granularity.

Anyway, It would be interesting to hear how vendors are dealing with
this and if they agree that fine grained entity beans are not only
desirable but practical. Conjecture from everyone else is also welcome,
but I think the vendors have a unique perspective on this since they are
the ones doing the actual implementation.

NOTE: There is room for improvement such as restricting the transaction
security attributes of local interface, which I cover in another e-mail.

Richard

--
Richard Monson-Haefel
Author of Enterprise JavaBeans, 2nd Edition  (O'Reilly 2000)
Co-Author of Java Message Service (O'Reilly 2000)
http://www.jMiddleware.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".

Reply via email to