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 Herbert Wu <he...@gmail.com> on 2007/05/15 22:00:00 UTC

Ibatis 2.0.8/Oracle 9 question: rollback on select

I am using Java iBatis 2.0.8 and Oracle DBA reported that a single
SELECT can trigger rollback. I did not use any transaction:
<transactionManager type="JDBC" >
    <dataSource type="JNDI">
    <property name="DataSource" value="java:/oracleDBSource"/>
  </dataSource>
</transactionManager>

So I copied the ibatis
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.java/JdbcTransactionConfig.java
to create a TestTransactionConfig.java tx manager to plug in

<transactionManager type="TestTransactionConfig.java" >
    <dataSource type="JNDI">
    <property name="DataSource" value="java:/oracleDBSource"/>
  </dataSource>
</transactionManager>

So when I step over this TestTransactionConfig.java and did not see
rollback() method is called.

i am wondering if anyone has issue with Ibatis 2.0.8 rollback on
select? Or it caused by underlying Oracle JDBC driver?

Your help is greatly appreciated.

-Herbert

Re: Ibatis 2.0.8/Oracle 9 question: rollback on select

Posted by Herbert Wu <he...@gmail.com>.
Thanks so much for the help!
-Herbert

On 5/15/07, Jeff Butler <je...@gmail.com> wrote:
> I'll speak to WebSphere (which has a similar issue).  This generally
> improves performance because the app server doesn't need to do anything to
> clean up abandoned transactions.  But all performance statements are best
> prefixed with "your milage may vary".
>
>
> Jeff Butler
>
>
>
> On 5/15/07, Herbert Wu <he...@gmail.com> wrote:
> > Is this going to cause database server performance issue if the SELECT
> > traffic is heavy?
> > -Herbert
> >
> > On 5/15/07, Jeff Butler <je...@gmail.com> wrote:
> > > This could be related to the underlying app server - iBATIS will always
> > > start a transaction, but will not always commit the transaction.  In
> some
> > > case this will cause the app server to rollback the transaction.  To
> alter
> > > this behavior, specify this:
> > >
> > > <transactionManager type="JDBC" commitRequired="true">
> > >    ....
> > > </transactionManager>
> > >
> > > Jeff Butler
> > >
> > >
> > >
> > > On 5/15/07, Herbert Wu <he...@gmail.com> wrote:
> > > > I am using Java iBatis 2.0.8 and Oracle DBA reported that a single
> > > > SELECT can trigger rollback. I did not use any transaction:
> > > > <transactionManager type="JDBC" >
> > > >    <dataSource type="JNDI">
> > > >    <property name="DataSource" value="java:/oracleDBSource"/>
> > > > </dataSource>
> > > > </transactionManager>
> > > >
> > > > So I copied the ibatis
> > > >
> > >
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.java/JdbcTransactionConfig.java
> > > > to create a TestTransactionConfig.java tx manager to plug in
> > > >
> > > > <transactionManager type=" TestTransactionConfig.java" >
> > > >    <dataSource type="JNDI">
> > > >    <property name="DataSource" value="java:/oracleDBSource"/>
> > > > </dataSource>
> > > > </transactionManager>
> > > >
> > > > So when I step over this TestTransactionConfig.java and did not see
> > > > rollback() method is called.
> > > >
> > > > i am wondering if anyone has issue with Ibatis 2.0.8 rollback on
> > > > select? Or it caused by underlying Oracle JDBC driver?
> > > >
> > > > Your help is greatly appreciated.
> > > >
> > > > -Herbert
> > > >
> > >
> > >
> >
>
>

Re: Ibatis 2.0.8/Oracle 9 question: rollback on select

Posted by Jeff Butler <je...@gmail.com>.
I'll speak to WebSphere (which has a similar issue).  This generally
improves performance because the app server doesn't need to do anything to
clean up abandoned transactions.  But all performance statements are best
prefixed with "your milage may vary".

Jeff Butler



On 5/15/07, Herbert Wu <he...@gmail.com> wrote:
>
> Is this going to cause database server performance issue if the SELECT
> traffic is heavy?
> -Herbert
>
> On 5/15/07, Jeff Butler <je...@gmail.com> wrote:
> > This could be related to the underlying app server - iBATIS will always
> > start a transaction, but will not always commit the transaction.  In
> some
> > case this will cause the app server to rollback the transaction.  To
> alter
> > this behavior, specify this:
> >
> > <transactionManager type="JDBC" commitRequired="true">
> >    ....
> > </transactionManager>
> >
> > Jeff Butler
> >
> >
> >
> > On 5/15/07, Herbert Wu <he...@gmail.com> wrote:
> > > I am using Java iBatis 2.0.8 and Oracle DBA reported that a single
> > > SELECT can trigger rollback. I did not use any transaction:
> > > <transactionManager type="JDBC" >
> > >    <dataSource type="JNDI">
> > >    <property name="DataSource" value="java:/oracleDBSource"/>
> > > </dataSource>
> > > </transactionManager>
> > >
> > > So I copied the ibatis
> > >
> > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.java
> /JdbcTransactionConfig.java
> > > to create a TestTransactionConfig.java tx manager to plug in
> > >
> > > <transactionManager type=" TestTransactionConfig.java" >
> > >    <dataSource type="JNDI">
> > >    <property name="DataSource" value="java:/oracleDBSource"/>
> > > </dataSource>
> > > </transactionManager>
> > >
> > > So when I step over this TestTransactionConfig.java and did not see
> > > rollback() method is called.
> > >
> > > i am wondering if anyone has issue with Ibatis 2.0.8 rollback on
> > > select? Or it caused by underlying Oracle JDBC driver?
> > >
> > > Your help is greatly appreciated.
> > >
> > > -Herbert
> > >
> >
> >
>

Re: Ibatis 2.0.8/Oracle 9 question: rollback on select

Posted by Herbert Wu <he...@gmail.com>.
Is this going to cause database server performance issue if the SELECT
traffic is heavy?
-Herbert

On 5/15/07, Jeff Butler <je...@gmail.com> wrote:
> This could be related to the underlying app server - iBATIS will always
> start a transaction, but will not always commit the transaction.  In some
> case this will cause the app server to rollback the transaction.  To alter
> this behavior, specify this:
>
> <transactionManager type="JDBC" commitRequired="true">
>    ....
> </transactionManager>
>
> Jeff Butler
>
>
>
> On 5/15/07, Herbert Wu <he...@gmail.com> wrote:
> > I am using Java iBatis 2.0.8 and Oracle DBA reported that a single
> > SELECT can trigger rollback. I did not use any transaction:
> > <transactionManager type="JDBC" >
> >    <dataSource type="JNDI">
> >    <property name="DataSource" value="java:/oracleDBSource"/>
> > </dataSource>
> > </transactionManager>
> >
> > So I copied the ibatis
> >
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.java/JdbcTransactionConfig.java
> > to create a TestTransactionConfig.java tx manager to plug in
> >
> > <transactionManager type=" TestTransactionConfig.java" >
> >    <dataSource type="JNDI">
> >    <property name="DataSource" value="java:/oracleDBSource"/>
> > </dataSource>
> > </transactionManager>
> >
> > So when I step over this TestTransactionConfig.java and did not see
> > rollback() method is called.
> >
> > i am wondering if anyone has issue with Ibatis 2.0.8 rollback on
> > select? Or it caused by underlying Oracle JDBC driver?
> >
> > Your help is greatly appreciated.
> >
> > -Herbert
> >
>
>

Re: Ibatis 2.0.8/Oracle 9 question: rollback on select

Posted by Jeff Butler <je...@gmail.com>.
This could be related to the underlying app server - iBATIS will always
start a transaction, but will not always commit the transaction.  In some
case this will cause the app server to rollback the transaction.  To alter
this behavior, specify this:

<transactionManager type="JDBC" *commitRequired="true"*>
   ....
</transactionManager>

Jeff Butler


On 5/15/07, Herbert Wu <he...@gmail.com> wrote:
>
> I am using Java iBatis 2.0.8 and Oracle DBA reported that a single
> SELECT can trigger rollback. I did not use any transaction:
> <transactionManager type="JDBC" >
>    <dataSource type="JNDI">
>    <property name="DataSource" value="java:/oracleDBSource"/>
> </dataSource>
> </transactionManager>
>
> So I copied the ibatis
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.java
> /JdbcTransactionConfig.java
> to create a TestTransactionConfig.java tx manager to plug in
>
> <transactionManager type="TestTransactionConfig.java" >
>    <dataSource type="JNDI">
>    <property name="DataSource" value="java:/oracleDBSource"/>
> </dataSource>
> </transactionManager>
>
> So when I step over this TestTransactionConfig.java and did not see
> rollback() method is called.
>
> i am wondering if anyone has issue with Ibatis 2.0.8 rollback on
> select? Or it caused by underlying Oracle JDBC driver?
>
> Your help is greatly appreciated.
>
> -Herbert
>