File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes setRollbackOnly() doesn't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "setRollbackOnly() doesn Watch "setRollbackOnly() doesn New topic

setRollbackOnly() doesn't work

ravinderSingh singh
Ranch Hand

Joined: Nov 18, 2004
Posts: 41
Hi all,

I'm using an Oracle database and Weblogic server. However, when I execute the following code (which is contained within an ejb session bean method):

... the insert statement is not rolled back even though I explicitly call setRollbackOnly().

Could anyone help?
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
What does your DD look like?

SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Sanjeev Verma
Ranch Hand

Joined: Aug 24, 2000
Posts: 87
Sun says - "Only enterprise beans with container-managed transactions are allowed to use this method." - is your bean marked as container-managed?
ravinderSingh singh
Ranch Hand

Joined: Nov 18, 2004
Posts: 41
I'm using container managed transactions.

The DD entry is as follows:


Any suggestions ... ?
jQuery in Action, 3rd edition
subject: setRollbackOnly() doesn't work
It's not a secret anymore!