Q&A

Q1:Why would you want to use BMTD for a session EJB rather than use CMTD?
A1: You use BMTD when CMTD is too simplistic. Typically this occurs when a stateful session bean starts a transaction in one business method but must complete it in another.
Q2:Why would it be pointless to deploy the getter of a multi-valued CMR field using the RequiresNew transaction attribute?
A2: A returned collection cannot be used outside of the transaction in which it was materialized, as RequiresNew forces a new transaction around the business method. The collection is invalid as soon as it is returned by the business method because the transaction has completed.
Q3:What happens to the current transaction when an EJB throws an application exception?
A3: The bean may or may not mark the transaction for rollback; consult the bean's documentation.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.247.159