• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Question about JTA

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


While testing a BMP Entity Bean, a developer discovers that a transaction rollback does not cause a rollback of the changes made to the
bean as it should. Which of the following should the developer suspect?
a) The ejbPassivate() method has a bug.
b) The ejbStore() method has a bug.
c) The ejbCreate() method has a bug.
d) The datastore does not support JTA.
e) The transaction does not implement javax.transaction.UserTransaction.
Answers: b, d


Why d is also a correct answer? Thanks.
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could anybody explain to me? Thanks. I don't know why.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is easier to explain why the other answers are not correct...
a) ejbPassivate() is not likely to come into play in this scenario and hence is not a usual suspect.
c) ejbCreate() is only involved when the entity is created. Since the question clearly states the the entity was changed, therefore it was already created, then ejbCreate() is not be called.
e) Frankly, this answer does not make any sense.
I remember this question from the IBM ICE test and we are told the question has exactly two answers, which only leaves b and d.
I think d is poorly worded. It should say something to the extent of the database not supporting transactions or XA protocol, I don't think it should explicitly mention JTA.
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chris Mathews:
It is easier to explain why the other answers are not correct...
a) ejbPassivate() is not likely to come into play in this scenario and hence is not a usual suspect.
c) ejbCreate() is only involved when the entity is created. Since the question clearly states the the entity was changed, therefore it was already created, then ejbCreate() is not be called.
e) Frankly, this answer does not make any sense.
I remember this question from the IBM ICE test and we are told the question has exactly two answers, which only leaves b and d.
I think d is poorly worded. It should say something to the extent of the database not supporting transactions or XA protocol, I don't think it should explicitly mention JTA.



Thanks Chris. Yes, this is from IMB ICE. I am just wondering if JTA or Transaction API is the guarantee to make a transaction roll back and make changes in the database.
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic