Home > Back-end >  Druid thread pool will automatically set the thread to submit?
Druid thread pool will automatically set the thread to submit?

Time:11-28

Today to see a project, with the transaction binding thread then behind closed directly, without the thread automatically submit set to true, thought to ask thread is turned off, the thread pool is that can set back to automatically submit it again, if not, then later use this link to the thread is not invalid directly,,,

CodePudding user response:

First you this description must be fun, suggest you to read what they write, if translated into code, compile.

AutoCommit is connected, is not a thread, if aop affairs, usually at the time of getting connection setting the autoCommit to false, commit after back into true

CodePudding user response:

Threads and automatically submit no relationship, it is as you say, transaction commit

CodePudding user response:

Awkward embarrassment, then write a bit messy, to connect all of the above threads, I mean at that time see he setAutoCommit (false); But in the end is not the current connection is closed will be set to true, have an effect on the back of the connection pool to obtain the connection
  • Related