Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can not commit a managed transaction  RSS feed

 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In one of our applications, a session bean whose transactions are container managed invokes a class for handling some database operations purely based on JDBC calls using a datasource. This is working fine in production every day. But some times we observed a phenomenon where in an exception was thrown mentioning that Managed transactions can not be commited explicitly. In our JDBC code, we have used the explicit commit statements but as mentioned this class handles DB operations purely based on JDBC. No entities or something else used.

So why is this working fine some times and why it is failing other times. Our application is deployed in JBoss 4.0.4 and the session bean,which calls the JDBC operating class is under container managed transaction. Any thoughts.
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could some one look into this and let me know the reason.

Please find the logs


2009-08-25 16:37:41,717 ERROR [STDERR] java.sql.SQLException: You cannot commit during a managed transaction!
2009-08-25 16:37:41,719 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:543)
2009-08-25 16:37:41,719 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:334)
2009-08-25 16:37:41,719 ERROR [STDERR] at
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!