I'm new to EJB. After spending about a week reading through the spec and scanning
through the archive (great forum!), there're still some nagging questions.
I had some experience (a while back) with OODB (Poet and Versant) and then on the
efforts of persistence Java. Other than the �beans� aspect, the notion of separating
the persistence storage implementation from domain/business logic is similar in OODB
and EJB. Specifically, an entity bean representing a persistent object (or row if
you�re purely relational) is instantiated by some finder methods and brought to live
in the container, much the same way as being �chased� through pointer in OODB.
Subsequent get/set of attributes (by the holder of the object in OODB terms, or by the
bean clients in EJB terms) are done through method invocation, without worrying about
transaction, just as if the in-core object is the same as on-disk/database object.
The part that gets me is that I�ve seen references (in both books and here) of the
same entity bean (of, say record A) can have multiple instances (all are record A, not
record A, B, C, etc) referenced by multiple clients. But I have seen no examples of
such to illustrate the scenarios where having multiple instances of the same bean are
desirable.
I can think of the reason where single instance can be a synchronization bottleneck,
but what�s the proper programming model for multiple instances of the same bean? Shall
I think of it the same OODB terms and assume every client is holding the only copy in
memory and it�s ALWAYS the same as the one on disk, and let the container worries
about maintaining consistence among all the instances of the same bean?
Is this flexibility in EJB (compared to OODB or persistent Java) purely for
performance optimization?
===========================================================================
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".