JBoss transaction rollback with jdbc
===

I am using JBoss 4.0.4 GA as application server and EJB 2.x for coding logic. I recently changed the **commit-option** in jboss configuration to **"B"** since we introduced some JDBC queries together with EJB. I added few logic in the EJB which are to be executed through a client.  I introduced the stored procedure and I am trying to call a procedure through CallableStatement.  I am using Innodb engine in MySQL for tables and jboss datasource is the simplest of configuration which uses <local-tx-datasource>.  But when I get the EJB interface and execute the EJB method I get following exception:  

> Caused by: org.jboss.resource.connectionmanager.JBossLocalXAException:
> could not commit local tx; - nested throwable:
> (org.jboss.resource.JBossResourceException: SQLException; - nested
> throwable: (java.sql.SQLException: No operations allowed after
> connection closed.))  at
> org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:912)
> at
> org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2253)
> at
> org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1784)
> at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:340)  ...
> 29 more 
> 
> Caused by: org.jboss.resource.JBossResourceException: SQLException; -
> nested throwable: (java.sql.SQLException: No operations allowed after
> connection closed.)  at
> org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:636)
> at
> org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:73)
> at
> org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:905)
> ... 32 more  
> 
> Caused by: java.sql.SQLException: No operations allowed after
> connection closed.  at
> com.mysql.jdbc.Connection.checkClosed(Connection.java:1842)  at
> com.mysql.jdbc.Connection.commit(Connection.java:2154)  at
> org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:69)
> ... 33 more