• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can not set auto commit in user transaction

 
lihong liu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created an entity bean in which I have an update method. This method updates three tables, so I have to do the followings:
try{
con=getConnection();
con.setAutoCommit(false);
//do transaction
con.commit();
}
catch(Exception e){ }
finally{
//error comes up when execute the following line
con.setAutoCommit(true);
//
con.close();
}

I get this error message while running in weblogic server : could not set auto commit(to true) in user transaction. It seems to tell me that the user transaction is not done yet in the finally statement. I would appreciate anybody's input!!!
Lihong
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic