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 Tom Henricksen <to...@gmail.com> on 2008/03/15 12:21:39 UTC

Websphere and iBatis Configuration

We are setting up our application to use Websphere's JDBC connection.
When we setup this in Websphere in version 5.1 we needed to add the
commitRequired=true to get it to work.

<transactionManager type="JDBC" commitRequired="true">
 <dataSource type="JNDI">
   <property name="DataSource" value="${DBSOURCE}"/>
 </dataSource>
</transactionManager>

Although in our Websphere 6.1 server we didn't have to add this.
Would it be a good idea to use this?
Do most people using Websphere use this?

Thanks in Advance,
Tom

Re: Websphere and iBatis Configuration

Posted by Stephen Boyd <sw...@gmail.com>.
I *think* Webpshere 6.x will call rollback on the connection if you return
it to the pool without calling commit or rollback yourself.  (Check your
SystemOut.log for warnings)  Also, I remember looking into this six months
ago and found that when you call setAutoCommit(true), for example, before
returning the connection to the pool, websphere's connection wrapper will
issue a commit.  Very nice of them, right?

Typically, most people will recommend running everything inside a
transaction, even reads.  Seems expensive but apparently, databases like db2
assign "claims" to system resources during a read and they can only be freed
by calling commit or rollback.

On Sat, Mar 15, 2008 at 7:21 AM, Tom Henricksen <to...@gmail.com>
wrote:

> We are setting up our application to use Websphere's JDBC connection.  When we setup this in Websphere in version 5.1 we needed to add the
>
>
> commitRequired=true to get it to work.
>
> <transactionManager type="JDBC" commitRequired="true">
>
>  <dataSource type="JNDI">
>    <property name="DataSource" value="${DBSOURCE}"/>
>
>  </dataSource>
> </transactionManager>
>
>
> Although in our Websphere 6.1 server we didn't have to add this.  Would it be a good idea to use this?
>
> Do most people using Websphere use this?
>
> Thanks in Advance,
> Tom
>
>