4 Replies Latest reply on Jun 29, 2016 10:08 AM by Daniel Simko

    WildFly 8.1.0.Final + MSSQL XA DataSource cannot handle JPA and JDBC in parallel

    Andreas Liebscher Newbie

      When using an EJB with REQUIRED transaction attribute and MSSQL XA DataSource we often get Lock Timeouts.

      We have loaded an JPA entity, in the corresponding table one attribute is updated with JDBC (DataSource.getConnection()) to prevent increment of the VERSION field.

      After that when trying to update the JPA entity with em.refresh() lock timeouts occur.

       

      This indicates that the database connection the EM uses (of course it is the same xa datasource) and the connection we receive directly from the datasource for JDBC update are NOT correctly associated with the same XA transaction!

       

      Similar behaviour to the association problem in beforeCompletion: Re: Re: new requirement for synchronization ordering (WildFly is delisting resources during Sychronization.beforeComplet…

       

      Transactions forum: Re: WildFly 8.1 + MSSQL XA DataSource cannot handle JPA and JDBC in parallel