AnsweredAssumed Answered

How to use Activiti in a environment with Sql Server DB configured with NOCOUNT=ON

Question asked by denisgmarques on Jun 27, 2014
Latest reply on Jun 30, 2014 by denisgmarques

We have a particular situation where we install the Activiti in a SQL SERVER 2008 R2 Server Database, which has other systems running. This server is configured with the NOCOUNT = ON attribute by default.

We checked the possibility of leaving the default configuration of SQL SERVER (NOCOUNT OFF), but this was refused by our costumer.

What happens is that somewhere in the code of MyBatis exist a update command (ps.execute()) and after this, if ps.getUpdateCount() was == -1, the Exception "was updated by another transaction concurrently" is showed.

The point is that in SQL Server, NOCOUNT = ON indicates no return the amount of rows affected, so the result always will be "-1".

We try to see if there was a way to set NOCOUNT attribute by user or by DATABASE, but no.

We also tried to verify the possibility to set some attribute in the connection string JDBC driver, but no success.

Someone can help us?