You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Gérard Ribière <ge...@netcourrier.com> on 2005/01/07 12:29:03 UTC
Committing Transactions with WebSphere and DB2
Hello,
I am using iBatis sqlMap 2.0.7 with IBM WebSphere Application Server
version 5.0.2.9
I use the standard sequence :
try
{
sqlMap.startTransaction ();
listeServeurs = sqlMap.queryForList("getListeServeurs", null) ;
sqlMap.commitTransaction ();
}
catch (Exception e)
{
gestionErreur("Erreur liste des serveurs ", e) ;
}
finally
{
try
{
sqlMap.endTransaction ();
}
catch(SQLException e)
{
gestionErreur ("Erreur fermeture de transaction ", e) ;
}
}
My transactions are read only transactions. However, I always get the
following message :
[07/01/05 12:20:44:219 CET] 228fdff7 LocalTransact E WLTC0033E: The
jdbc/StatHttp resource was cancelled during the cleaning of a non
resolved LocalTransactionContainment.
[07/01/05 12:20:44:234 CET] 228fdff7 LocalTransact E WLTC0032E: One or
more resources have been cancelled. A LocalTransactionContainment
includes a non resolved cancelling operation.
[07/01/05 12:20:44:234 CET] 228fdff7 TraceNLS u No message text
associated with key LocalTransaction.rolled-back.due.to.setRollbackOnly
in bundle com.ibm.ejs.resources.seriousMessages
[07/01/05 12:20:44:234 CET] 228fdff7 WebAppTransac E LocalTransaction
rolled-back due to setRollbackOnly
[07/01/05 12:20:44:250 CET] 228fdff7 WebGroup E SRVE0026E: [Servlet
Error]-[LocalTransaction rolled-back due to setRollbackOnly]:
com.ibm.ws.LocalTransaction.RolledbackException
at
com.ibm.ws.LocalTransaction.LocalTranCoordImpl.cleanup(LocalTranCoordImpl.java:966)
I was able to work around this problem by adding the following two
statements in the try block :
java.sql.Connection connection = sqlMap.getCurrentConnection() ;
connection.commit() ;
That is, I am committing the transactions myself.
Any idea about what happens ?
Thank you in advance.
Re: Committing Transactions with WebSphere and DB2
Posted by Larry Meadors <la...@gmail.com>.
You may want to check out the wiki for info on WS.
http://wiki.apache.org/ibatis/Database_20Specific_20Information
Larry
On Fri, 07 Jan 2005 12:29:03 +0100, Gérard Ribière
<ge...@netcourrier.com> wrote:
> Hello,
>
> I am using iBatis sqlMap 2.0.7 with IBM WebSphere Application Server
> version 5.0.2.9
> I use the standard sequence :
> try
> {
> sqlMap.startTransaction ();
> listeServeurs = sqlMap.queryForList("getListeServeurs", null) ;
> sqlMap.commitTransaction ();
> }
> catch (Exception e)
> {
> gestionErreur("Erreur liste des serveurs ", e) ;
> }
> finally
> {
> try
> {
> sqlMap.endTransaction ();
> }
> catch(SQLException e)
> {
> gestionErreur ("Erreur fermeture de transaction ", e) ;
> }
> }
>
> My transactions are read only transactions. However, I always get the
> following message :
>
> [07/01/05 12:20:44:219 CET] 228fdff7 LocalTransact E WLTC0033E: The
> jdbc/StatHttp resource was cancelled during the cleaning of a non resolved
> LocalTransactionContainment.
> [07/01/05 12:20:44:234 CET] 228fdff7 LocalTransact E WLTC0032E: One or more
> resources have been cancelled. A LocalTransactionContainment includes a non
> resolved cancelling operation.
> [07/01/05 12:20:44:234 CET] 228fdff7 TraceNLS u No message text
> associated with key LocalTransaction.rolled-back.due.to.setRollbackOnly in
> bundle com.ibm.ejs.resources.seriousMessages
> [07/01/05 12:20:44:234 CET] 228fdff7 WebAppTransac E LocalTransaction
> rolled-back due to setRollbackOnly
> [07/01/05 12:20:44:250 CET] 228fdff7 WebGroup E SRVE0026E: [Servlet
> Error]-[LocalTransaction rolled-back due to setRollbackOnly]:
> com.ibm.ws.LocalTransaction.RolledbackException
> at
> com.ibm.ws.LocalTransaction.LocalTranCoordImpl.cleanup(LocalTranCoordImpl.java:966)
>
> I was able to work around this problem by adding the following two
> statements in the try block :
>
> java.sql.Connection connection = sqlMap.getCurrentConnection()
> ;
> connection.commit() ;
> That is, I am committing the transactions myself.
>
> Any idea about what happens ?
> Thank you in advance.
>
>
>