I have a question on the Transaction Attributes for MDB's. The O'Reilly book says that for an MDB (which does not have a client view), only NotSupproted or Required makes sense. But from the meaning of other attributes, it makes sense that Supports, Never also makes sense for an MDB. Any suggestions?
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
1• If the client calls with a transaction context, the container performs the same steps as described
in the REQUIRED case.
• If the client calls without a transaction context, the container performs the same steps as
described in the NOT_SUPPORTED case
Due to second reason, the Support Attribute cannot be used.
3) it beans the starting MDB code can never have transaction. So even if MDB lifecycle method's want to start a new transaction, the def. of NEVER attribute will not allow it.
Due to this reason, the Never attribute cannot be used.
whereas NotSupported and Required has no such restrictions.
As an MDB does not have a local or remote business interface there are not methods for a client to invoke. So transaction attributes that depend on the state of the client (within or outside a transaction) are irrelevent. For example, it doesn't make sense to define that a client must never be within a transaction (Never) because it can't invoke a method on the MDB anyway!
I like tacos! And this tiny ad:
a bit of art, as a gift, the permaculture playing cards