Forums Register Login

Question about JTA

+Pie Number of slices to send: Send
 


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.
+Pie Number of slices to send: Send
Could anybody explain to me? Thanks. I don't know why.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
 

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.
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 737 times.
Similar Threads
Hard ICE question 2
Need help in MDB
Transaction handling in Session Bean
ICE 287 answers for WebSphere 5.0
488/158 ICE questions & 488/155 resources page
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:56:12.