mysql - Will NamedParameterJdbcTemplate.update wait until the transaction finishes? -
i'm using update method in namedparamameterjdbctempalte implements org.springframework.jdbc.core.namedparam.namedparameterjdbcoperations.
i looked docs , thing can find "this method issues update via prepared statement, binding given arguments."
i have code looks this
//calling jdbctemplate.update() here on foo objects //calling update on same set of foo objects (i know it's dump let's leave is)
now question first update wait until transaction completed return, or issue request , return? when second line, have guarantee transaction issued first call update has finished?
i seem seeing mysql deadlock once in while , suspect that's because first update has not finished job when second 1 comes in.
found question, answer doesn't answer question. how avoid mysql 'deadlock found when trying lock; try restarting transaction'
Comments
Post a Comment