I'm a transaction newbie, so bear with me...
If we have a layered architecture where we have stateless session beans in a
services layer, and entity beans in a domain layer (i.e., the Gemstone
"FoodSmart" architecture at www.javasuccess.com), would it be unreasonable
to say that all session beans could have a TX attribute of "TX_REQUIRED",
and all entity beans could have a TX attribute of "TX_MANDATORY"? This seems
appealing to me because:
a) This would essentially force all entity beans to be called through
session beans (what we want, at least in this architecture)
b) This would allow for Java clients with user-managed transactions, but
otherwise would force creation of new transactional contexts for methods
called on the stateless session beans (also what we want in this
architecture... any individual method call on a stateless bean either
succeeds or fails, and stateless bean methods can call other stateless bean
methods to provide services, without creating new transactional contexts).
I realize that this isn't appropriate in all cases (i.e., if we have a
session bean that don't require *any* transactional context), but in
general, setting the TX attributes in this way makes sense to me.
Any comments?
KurtC
===========================================================================
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".