As far as I undetrstood you use the non-jta-datasource if you use local transactions instead of jta. I have no clue though why there are these two elements. It is very well posssible of course that I missunderstood something in the spec.

Did you find any explanation in the jpa specs about this?

Christian

On 11.07.2016 11:15, Bengt Rodehav wrote:
Sorry missed your last mail...

Still wonders when the <non-jta-datasource> would be used?

/Bengt

2016-07-11 11:13 GMT+02:00 Christian Schneider <[email protected] <mailto:[email protected]>>:

    On 11.07.2016 10:58, Bengt Rodehav wrote:

    There is also a difference in the way I published the datasource
    with Blueprint and the way it is being done in pax-jdbc. With
    Blueprint I published both a DataSource and an XADataSource.
    pax-jdbc is only publishing a DataSource but somehow still
    supports XA (I don't really know how this works).
    This is something I read in the transaction specs. The user should
    always use a DataSource. XADataSource is just for internal use by
    the app server.
    The app server has the responsibility of wrapping the XADataSource
    in a DataSource and do the resource enlistment with the
    TransactionManager.

    Christian

    There is a risk that someone (OpenJPA, JPA Blueprint, ...) is
    checking if it is dealing with a DataSource or an XADataSource.
    If the first then auto commit should be OK, if the latter not and
    it may then try the <non-jta-datasource> instead. Since we are
    only publishing a DataSource (via pax-jdbc) it could signal to a
    client that auto commit is OK since this is not an XADataSource.
    Do you agree?

    /Bengt

-- Christian Schneider
        http://www.liquid-reality.de

        Open Source Architect
        http://www.talend.com




-- Christian Schneider
    http://www.liquid-reality.de

    Open Source Architect
    http://www.talend.com




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to