• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UserTransaction.getStatus() values

 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a mock exam I was asked which value should have the UserTransaction.getStatus() method been compared to if the transaction wasn't marked for rollback. The possible values were 0 and *non zero*. Where could I find those values specified? I've looked into the specs, but nothing, and also I've look the Javadoc for the J2EE API, with the same result.

 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here
 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Keerthi P:
Here


The problem is that at the link you gave me, there is no mention of the actual value for those constants, and on the mock exam it was required either zero or non zero.
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh OK. I see your problem now. YOu may print the constants one by one to see the value:
System.out.println(Status.STATUS_COMMITTED);

 
Me
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marco Tedone
I also have seen this kind of question in a mock exam. It is always good to know as much as you can but if you see HFEJB page 489 foot note, you don't need to know about these constant values for exam. So you relax and good luck for your exam on Friday.
[ August 25, 2004: Message edited by: Muzammil Hussain ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic