This week's book giveaway is in the Open Source forum.
We're giving away four copies of Programmers Guide to Apache Thrift and have Randy Abernethy on-line!
See this thread for details.
Win a copy of Programmers Guide to Apache Thrift this week in the Open Source forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

My exam cloud mock 3, about restrictions on bean managed transaction  RSS feed

 
Ranch Hand
Posts: 1732
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Which two are restrictions of beans with bean-managed transactions?
A. The NOT_SUPPORTED transaction attribute must be chosen.
B. Clients calling with a transactional context are prohibited and will result in an exception.
C. A stateful session bean must commit a started transaction before a business method returns.
D. A bean that starts a transaction must complete the transaction before it starts a new transaction.
E. A message-driven bean instance must commit a transaction before the onMessage method returns.
Given answer : D and E


But I think the answer should be B and E.
I think B is refering to nested transaction, which is not supported by EJB container.
For D, a bean can suspend a current transaction and start a new transaction. When that new transaction completes, the current
transaction resumes. There is an interface, TransactionManager, which defines suspend() and resume() methods.

 
Creator of Enthuware JWS+ V6
Posts: 3272
296
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, D and E are correct.

I think B is refering to nested transaction, which is not supported by EJB container.  


D is referring to nested transactions: "A bean that starts a transaction must complete the transaction before it starts a new transaction." , you cannot do this in a Bean managed bean:

Option B is OK because it is allowed for a client to call a BMT bean with a transaction context, however the container will then suspend the active client transaction.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!