• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Transaction Q

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).


 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic