The 'ExternalTransationConfig' class checks if the 'DefaultAutoCommit'
and 'SetAutoCommitAllowed' flags are set as properties within
the 'transactionManager' tag. When configured as below, the select query
executes without any errors ---
<sqlMapConfig>
<transactionManager type="EXTERNAL">
<property name="SetAutoCommitAllowed" value="true"/>
<property name="DefaultAutoCommit" value="true"/>
<dataSource type="JNDI">
......
</dataSource>
</transactionManager>
<sqlMap resource="........"/>
</sqlMapConfig>
If the above configuration is not recommended for use with Bean Managed
Transactions using a Stateless Session Bean EJB, please advise.
======================================================================
javax.ejb.TransactionRolledbackLocalException
Pat
Thu, 08 Sep 2005 13:53:25 -0700
I get a 'javax.ejb.TransactionRolledbackLocalException' when i execute a select
query using a DB2 Stored Procedure. I am using iBATIS 2.0. In my sql-map-
config.xml I have set my 'transactionManager' type to EXTERNAL.
I am using Bean Managed Transactions, and I am NOT DOING an explicit
transaction.begin()+commit() since i am executing a select query. FYI - I dont
get the exception when I do an explicit transaction.begin()+commit().
It looks like iBATIS is somehow flagging the transaction as rolled back, and is
causing the 'postInvoke' method in the generated EJB stubs to throw the
exception. How do i turn off transactions in iBATIS?
The begining of the stacktrace is attached below ------
javax.ejb.TransactionRolledbackLocalException: ; nested exception is:
com.ibm.ws.exception.WsEJBException
com.ibm.ws.exception.WsEJBException
at java.lang.Throwable.<init>(Throwable.java)
at javax.ejb.EJBException.<init>(EJBException.java:26)
at com.ibm.ws.exception.WsEJBException.<init>(WsEJBException.java:105)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException
(LocalExceptionMappingStrategy.java:159)
at
com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackE
xception(LocalExceptionMappingStrategy.java:293)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3128)