Floyd,
There have been several threads on this subject both on here and on
TheServerSide.
The short answer is yes, this is very indeed true. I suggest a quick review
of Section 9.X of the EJB 1.1 spec. The spec allows container implementors
to syncrhonize access to entities in one of two ways. The first is by
having multiple instances of a single EntityBean's EJBObject. So for PK "1"
we have one EJBObject but would have a single instance for every client
using that entity. Consistancy of the data is kept between the RDBMS
syncrhonizing access and the container detecting and resolving the formation
of local diamonds. The second option is for the container to have just one
instance of the enitty for that one EJBObject and handle syncrhonization at
the app server layer.
AFAIK only BEA does the second choice. Most every other app server has
multiple instances for every entity. <VENDOR> I find the first option more
preferable for performance. The RDBMS is going to lock and maintain
consistancy even if the container is trying to do it too. Why should you
lock in two places? The only downfall is the container needs to prevent the
formation of diamonds by maintaing a hash of instances of EJBObjects and
resolving via calls to ejbLoad(). </VENDOR>
Dave Wolf
Internet Applications Division
Sybase
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Floyd Marinescu
> Sent: Friday, September 08, 2000 3:54 AM
> To: [EMAIL PROTECTED]
> Subject: can multiple instances of an entity bean with the same PK
> exist?
>
>
> Hi everyone,
>
> I was stumped by the following post on TheServerSide:
> http://www.theserverside.com:8080/patterns/thread.jsp?thread_id=220#2665
>
> Gal suggests that most ejbServers will load multiple instances of an
> entity bean with the same primary key inorder to service multiple clients.
>
> Is this true? Which app. servers do this?
>
> He also suggests that serializeable transactions on these
> beans won't
> really be serializeable, how is that possible? What does it matter what
> concurrency algorith is used, the spec says serializeable
> transactions must
> occur in a serial fashion, so thats all a developer should be
> concerned with
> right?
>
> dazed and confused,
>
> Floyd Marinescu
>
> ---------------------------------
> Senior Architect / Director of Marketing
> The Middleware Company
> http://www.middleware-company.com
> http://www.TheServerSide.com
> [EMAIL PROTECTED]
> 416-889-6115
>
> Check out TheServerSide.com, the internets first J2EE community!!!
>
> ==================================================================
> =========
> 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".