The simplimistic optimistic concurrency, which jkw discussed does not
violate EJB 1.1 specification. Infact it can be appplied to provide
optimization for CMP entitiy beans in EJB 2.0 architecture.

But, the type of optimization I was referring to can be applied at a higher
level. The Persistence Manager may not even call any database access code if
no cmp fields are modified in the transaction. When multiple entity beans
are involved in the same transaction, which can happen for example when
beans/dependent objects are navigated through relationships, the callbacks
help in reducing access to the persistent store.

Hemant
Server Team,
Pramati Technologies
www.pramati.com

----- Original Message -----
From: "Jonathan K. Weedon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 11:53 PM
Subject: Re: cmp


Hemant Khandelwal wrote:
>
> Note that cmp-fields in EJB 1.1 CMP entity beans are stored as state
> variables. Hence callback, when cmp-fields are modified, is not made on
the
> Container. Therefore, EJB 1.1 Container vendor cannot provide optimized
> access to persistent store in a standard way. Though, some EJB 1.1
Conatiner
> vendor provide such optimization in a vendor-specific way.

Although it is true that callbacks do not occur in EJB 1.1 to indicate
that a CMP field is modified, it is not particularly hard for an EJB
1.1 Persistence Manager to detect which fields were modified at store
time.  This information can be used to suppress the update if the bean
was unmodified.  This provides high-performance support for read-only
access, without requiring a proprietary "isModified()" method.

<vendor>

We use this technique in Borland AppServer to provide not only suppression
of updates for read-only access, but also to provide "tuned updates"
(whereby only the fields that were modified are updated) and "verified
updates" (whereby we verify that the record was not modified during
the transaction, which could occur in the case where the record was
not locked in the database at load time).  See my posting:

  Real-world limitations of simplistic optimistic concurrency schemes

for further details.  It can be found at:

  http://archives.java.sun.com/cgi-bin/wa?A2=ind0009&L=ejb-interest&P=R75066

</vendor>

-jkw

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

Reply via email to