dan benanav wrote:
>
> So now we have a problem. Pessimistic concurrency seems best for updates and
>optimistic concurrency seems best for read only operations. If I am willing to take
>the performance hit, and in practice that may not be so bad, I still have one
>problem. When read only operations are implemented the ejbLoad -> call method ->
>ejbStore paradigm is not what is wanted. The problem is the ejbStore at the end.
>For read only operations why update the database? I guess this can be resolved
>somewhat by using a dirty flag. In ejbStore only update the database if the dirty
>flag is set. I believe the WLS has some solution to this but it doesn't look very
>clean to me.
I have previously suggested that Sun add to the XML deployment descriptor a
read-only flag for methods (on both entity beans and session beans). The idea
is: the container can choose to ignore this flag, or it can avoid calling
ejbStore for any entities accessed by a transaction that was initiated by a
read-only method or for entities that were accessed only by read-only methods.
In the case where (through a vendor-specific deployment option) you have
requested pessimistic concurrency control for updates and a transaction is
initiated by a call to a read-only method, you can avoid using pessimistic
locking for the read-only transactions.
<vendor>
Sybase EAServer allows you to declare methods as read-only (no code required).
Although the server is unaware of whether or not beans use pessimistic locking,
we do apply the optimization of avoiding ejbStore when an entity has only been
accessed by read-only methods during a transaction.
</vendor>
________________________________________________________________________________
Evan Ireland Sybase EA Server Engineering [EMAIL PROTECTED]
Wellington - New Zealand +64 4 934-5856
===========================================================================
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".