aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Transaction Q Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Transaction Q" Watch "Transaction Q" New topic
Author

Transaction Q

Vishakha Ahuja
Ranch Hand

Joined: Sep 13, 2000
Posts: 191
An EJB client has no current transaction. It invokes the business method of an EJB using container-managed transaction demarcation. The business method executes within the scope of a transaction. Which of the following are possible values for the bean method's transaction attribute?
a)NotSupported
b)Supports
c)Required
d)RequiresNew
e)Mandatory
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).


Joe Nguyen
Ranch Hand

Joined: Apr 20, 2001
Posts: 161
Hi Vishakha
Since the business method must be executed within a transaction, I select c and d
require: if client transaction exists, the container will propagate the client transaction. Otherwise, container will create a new transaction.
requireNew: if client transaction exists, the container will suspend the current transaction and create a new one. Otherwise the container will create a new transaction.
Joey
scott irwin
Ranch Hand

Joined: Aug 07, 2000
Posts: 87
a) NotSupported - would not start a transaction, if one exists it suspended for this method.
b) Supports - would not start a transaction, it executes in the trasactions scope if one is provided (in this case, there is none).
e) Mandatory - a transaction context must exist before the method is called, otherwise an exception (something like transactionrequired) is thrown.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transaction Q