You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "seenu.atluri" <se...@gmail.com> on 2016/05/10 11:47:45 UTC

DefaultAutoCommit for JTAManaged Datasource.

Hi,

We are using JTAManaged Datasource in TomEE 7.0.0-M3. We are not specifying
defaultAutoCommit in DS configuration with the assumption that it will be
set by the container accordingly.

Our Jenkins nightly build is getting hung after running few tests since one
of the connection is prematurely closed and leaving a lock on table and
another connection is waiting indefinitely for the lock to release.

We set defaultAutoCommit to true for JTAManaged DS, now tests are running
fine. I am curious to know how defaultAutoCommit is handled for JTAManaged
connection/DS.

Also, As per docs,defaultAutoCommit defaults to true if it is not specified.
When we see the DS configuration in JMX console defaultAutoCommit is blank
if not specified. Is that correct?

Thanks & Regards,
Srinivas Atluri.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/DefaultAutoCommit-for-JTAManaged-Datasource-tp4678391.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: DefaultAutoCommit for JTAManaged Datasource.

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

if not set and you use tomcat-jdbc (the default) then null means the driver
one is used - so depends your driver.

Usually auto commit is set to false for JTA usage to let JTA handle it
(avoid a commit to happen beore JTA rollbacks for instance) and depends for
other usages.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-05-10 13:47 GMT+02:00 seenu.atluri <se...@gmail.com>:

> Hi,
>
> We are using JTAManaged Datasource in TomEE 7.0.0-M3. We are not specifying
> defaultAutoCommit in DS configuration with the assumption that it will be
> set by the container accordingly.
>
> Our Jenkins nightly build is getting hung after running few tests since one
> of the connection is prematurely closed and leaving a lock on table and
> another connection is waiting indefinitely for the lock to release.
>
> We set defaultAutoCommit to true for JTAManaged DS, now tests are running
> fine. I am curious to know how defaultAutoCommit is handled for JTAManaged
> connection/DS.
>
> Also, As per docs,defaultAutoCommit defaults to true if it is not
> specified.
> When we see the DS configuration in JMX console defaultAutoCommit is blank
> if not specified. Is that correct?
>
> Thanks & Regards,
> Srinivas Atluri.
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/DefaultAutoCommit-for-JTAManaged-Datasource-tp4678391.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>