• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about JTA  RSS feed

 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Could anybody explain to me? Thanks. I don't know why.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!