William Grosso wrote:
>
> Chip Wilson wrote:
> >
> > [Chip Wilson]
> > If a business method does not modify an entity, then the method
> > should not require a transaction and one should not be begun, either
> > explicitly or declaratively. No transaction commit, no call to ejbStore.
> >
>
> This seems questionable for two reasons.
>
> 1.. It's, more or less, the assertion that you never want to
> acquire a read-lock unless you're writing something back out to
> the persistent storage mechanism. This seems the most common
> case :-), but is it universally the case ? I can see cases where
> you want to guarantee that data won't change underneath you.
>
> 2.. Business methods can be invoked by other business methods.
> While the invoked method might not *require* a transaction, it
> might still *support* them (for the reason in 1). In which case,
> the "should not require" part of the answer doesn't suffice to
> avoid the overhead.
I agree. The EJB spec should simply add a read-only-method property to the XML
deployment descriptor that the container vendor is free to use (but not
required to use) for avoiding ejbStore calls.
________________________________________________________________________________
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".