Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with transaction.timeout  RSS feed

 
Attila Barbocz
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a session EJB with container-managed transaction in J2EE RI and MS SQL environment.
I have a method in it with "Trans-attribute=required" transaction setting:
...
...
try {
prepStmt = con.prepareStatement(updateStatement);
prepStmt.executeUpdate();
prepStmt.close();
} catch(Exception ex) {
context.setRollbackOnly();
System.out.println(ex.toString());
}
...
If the above update meets with database lock then the transaction will not time out in spite the fact that
the transaction.timeout property in the default.properties file was set to 5.
When the database lock stops I get the following error message on the server side:
javax.ejb.EJBException: Transaction aborted (possibly due to transaction time out)
What do I have to do ?
Thanks for any help
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!