• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Enthuware question doubt

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
com.enthuware.ets.scbcd.v5.2.157




(A) A new transaction will be started for method1() even if the client calls it within a transaction.
(B) Calling method1() within a transaction will cause an exception to be thrown.
(C) Both the methods, method1 and method2, may be invoked within a transaction and no exception will be thrown.
(D) None of these.

The correct answer given is (C)
explanation given is:
The existing transaction will be suspended because of NOT_SUPPORTED.



My answer is (D)
Since both method1 and method2 is now having Transaction Attribute NOT_SUPPORTED,
If client is running under its transaction context, when calling method1/method2, the client transaction is suspended and thus method1/method2 will not running in transaction context
If client is not running under its transaction context, when calling method1/method2, no new transaction will be created and thus method1/method2 will not running in transaction context


May I know what is your answer and explanation ? Thanks !
 
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lee Kian Giap wrote:com.enthuware.ets.scbcd.v5.2.157




(A) A new transaction will be started for method1() even if the client calls it within a transaction.
(B) Calling method1() within a transaction will cause an exception to be thrown.
(C) Both the methods, method1 and method2, may be invoked within a transaction and no exception will be thrown.
(D) None of these.

The correct answer given is (C)
explanation given is:
The existing transaction will be suspended because of NOT_SUPPORTED.



My answer is (D)
Since both method1 and method2 is now having Transaction Attribute NOT_SUPPORTED,
If client is running under its transaction context, when calling method1/method2, the client transaction is suspended and thus method1/method2 will not running in transaction context
If client is not running under its transaction context, when calling method1/method2, no new transaction will be created and thus method1/method2 will not running in transaction context


May I know what is your answer and explanation ? Thanks !



I do not see anything wrong...
I think you misunderstand question.

Yes the methods can indeed be called without an exception being thrown if client is in a transaction. So c is not wrong.
 
Lee Kian Giap
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, you are right, I misunderstand question the.


I have pass the exam today with 81% today ~

Thank a lot !
 
reply
    Bookmark Topic Watch Topic
  • New Topic