MyBatis update timeout does not run

2

When I execute an UPDATE in MyBatis it hangs, if I put timeout "20" it interrupts the execution due to the excess of time.

Mapper:

<update id="actualizarUnaSalida" timeout="20">
    UPDATE dbo.TbSALIDAS 
    SET Facturado=1
    WHERE IdSalidas = 599
</update>

Call Update

session = ConnectionFactory.getSessionCatalogos().openSession();
daoDetalleCatalogo = session.getMapper(DetalleCatalogoEspecialBeanMapper.class);

daoDetalleCatalogo.actualizarUnaSalida();//<- Entra pero no sale

As you can see the UPDATE is the simplest possible in case the error came by parameters or something like that.

Even if I do not put the mappings that's fine since I use the class DetailCatalogEspecialBeanMapper to do SELECT and that does work.

As a detail I want to comment that when I run the application and hang on the Update if I open SQL Management and try to do an UPDATE it does not work either, it's like it leaves it blocked, instead SELECT if it executes.

If anyone can give me a clue, I appreciate it.

    
asked by nachfren 28.06.2017 в 10:33
source

1 answer

0

In the end I managed to detect the error.

What was happening was that the Update, Delete and Insert were blocked because they had not closed the session in the previous query.

Thanks to this query of here I got to know which query was blocking my Update and thus find the blocking error of the Sql server database.

    
answered by 29.06.2017 / 11:48
source