Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

transaction in jsp  RSS feed

 
Mallika Kumar
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have two methods in my jsp page, which in turn call java beans, which call ejbs. I want both the methods to execute only if both of them return desired results. First method posts to a site, and the second method updates a table in the database. Now, if the post is unsuccessful, I'm not calling the update method. But if the post is successful, and the update fails, then I shouldn't be posting at all. I should be able to rollover the post. Is there a way to achieve this ?
Any response will be gladly appreciated.
Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!