On Fri, 28 Jul 2000 10:04:09 +0100, Lahooti, Hamid
<[EMAIL PROTECTED]> wrote:
>>> The containers can have 2 different policies here: either
>>> serialise access
>>> to the entity beans (e.g. WebLogic) or rely on the resource manager to
>>> provide the transaction isolation (e.g. WebSphere).
>
>>If isolation is left to the database, how does the WebSphere container
>>provide isolation of EJB object state?
>>Regards
>>Alex Thomas
>
>That's the point. The WebSphere container in itself doesn't provide
>that isolation. It doesn't have to. It simply honours the session bean's
>transaction demarcation (TX_BEAN_MANAGED or TX_REQUIRED) and transaction
>isolation (TRNSACTION_SERIALIZABLE) requirements by delegating them to
>the RDBMS/OODBMS.
I might be missing something here, but that seems rather dumb, since it
makes it impossible for the app.server to cache Entity data. Why? Well,
since the container uses optimistic concurrency control it is relying on
the database to provide the real locking. However, if the isolation
level is set to SERIALIZABLE, which essentially means "use pessimistic
concurrency control", then the container must contact, or "touch", the
database on each transaction in order to ensure that a lock is acquired.
If the data is cached, then there is no need to get the data from the
DB, and hence there is no way for the DB to enforce the isolation level.
The conclusion is that it is impossible to use
* optimistic concurrency control in the container container
and
* caching of Entity data
and
* SERIALIZABLE isolation level in the DB
So, for applications that rely on caching of Entity data for
performance, using a container with optimistic concurrency control will
not be a good idea.
Makes sense? Or what am I missing?
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.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".