java - JDBC Transaction beginning -


in jdbc can transaction begins connection , finishes close connection. right? if yes can in different requests sharing same connection, uncommitted transactions visible requests?

@balusc - not correct really. default autocommit set true, means transaction begins before jdbc operation , finishes right after single operation - not when connection closed.

but right sharing connection indeed not good, if want multi-thread db it's best handle in way have thread pool (look threadpoolexecutor in java.util.concurrent) , each thread separate connection. connectionpool one, rather limit through threadpool - way there never thread waiting connection pool.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -