ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Default transactionManager for WebSphere application not using EJBs
Date Mon, 25 Aug 2008 22:17:44 GMT
UserTransaction is a configuration setting required for JTA.  See here:


You are correct that JTA is only *needed* if there are two or more
resources.  However, even with one resource I believe that WebSphere
is creating a JTA compatible transaction.  So it will always work to use

I believe that the jdbc connection.close() method in effect transfers
through to the underlying JTA transation.  So maybe JTA is a more direct
route to the actual transaction - but this is heavy WebSphere internals and
I don't know the answer for sure.

As to whether one is better than the other in your specific case, I can't
say.  If it's not broke, don't fix it.  If it is broke, give JTA a try to
see if it makes a difference.  Then you'll know.

Jeff Butler

On Mon, Aug 25, 2008 at 3:16 PM, Michael Schall <mike.schall@gmail.com>wrote:

> We are using iBATIS in a large application that does not use EJBs and it
> works great.  We are seeing some issues where we are using more connections
> than we think we should be.  We are wondering if we have some issues with
> connections/transactions not closing as fast as we would like them to.  Our
> current transactionManager looks like the following:
>     <transactionManager type="JDBC" commitRequired="true">
>         <dataSource type="JNDI">
>             <property name="DataSource" value="java:comp/env/jdbc/..."/>
>         </dataSource>
>     </transactionManager>
> A link (
> http://opensource.atlassian.com/confluence/oss/display/IBATIS/Environment+Specific+Information)
> in a recent post pointed me to a different config:
>     <transactionManager type="JTA" commitRequired="true">
>         <property name="UserTransaction"
> value="java:comp/env/UserTransaction"/>
>         <dataSource type="JNDI">
>             <property name="DataSource" value="java:comp/env/..."/>
>         </dataSource>
>     </transactionManager>
> From what I have read, JTA is needed if you require 2 phase commits, which
> we don't.  Is JTA a better choice anyway?  What is the UserTransaction
> property doing here?
> Thanks for your time.
> Mike

View raw message