The Artima Developer Community
Sponsored Link

Java Answers Forum
Transaction Handling(in EJB)

1 reply on 1 page. Most recent reply: Aug 3, 2004 3:43 AM by Kiran Kumar R

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Manish

Posts: 3
Nickname: manishet
Registered: Apr, 2003

Transaction Handling(in EJB) Posted: Jun 12, 2003 10:28 PM
Reply to this message Reply
Advertisement
Hi,

I need to use the combination of stored procedure and entity beans such that in between the logic which is implemented in the session bean I need to call the stored procedure. This stored procedure makes some entries in the the table. My problem is that the entity beans which I am using are container managed, so if some exception occurs in the method after SP is invoked the rows inserted by procedure is not rolled back. Is there any solution to this?

thanks in advance
Manish


Kiran Kumar R

Posts: 1
Nickname: kirankumar
Registered: Aug, 2004

Re: Transaction Handling(in EJB) Posted: Aug 3, 2004 3:43 AM
Reply to this message Reply
Hi, This might help you..

The setRollbackOnly() method gives a bean the power to veto a transaction.
This power can be used if the bean detects a condition that would cause inconsistent data to b e committed when the transaction completes.
Once a bean invokes the setRollbackO nly() method, the current transaction is marked for rollback and cannot be commi tted by any other participant in the transaction--including the container.

http://www.unix.org.ua/orelly/java-ent/ebeans/ch08_05.htm

http://www.leocrawford.org.uk/work/jcea/part1/ejb.html
Kiran

Flat View: This topic has 1 reply on 1 page
Topic: how to call to bean from jsp in weblogic 6.1 Previous Topic   Next Topic Topic: Java graphics options for map editor..

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use