The JDBC classes are not reentrant, so you have to synchronise use of object instances of connection, statement, etc. They cannot savely be used by multiple threads concurrently. Use of a connection pool is a good way to streamline concurrent access to a database. Edit If you're sure that the threads never use the same connection, you could check can the pool be out of connections?
How is that handled? Could it be that 2 updates act on the same record where the first get overwritten? Do you catch all exceptions and log them in your workers?
The sad thing is, that I am already using a Connection Pool (BoneCP) ... I also use a ThreadPoolExecutor to handle the different Threads that execute the SQL operations - the workqueue used for the ThreadPoolExecutor works in a FIFO way. I thought that these both technologies would ensure an errorless concurrent access to a database. – Vilius Nov 12 at 19:36 @Villius, see edit – rsp Nov 12 at 19:45 Thank's for the suggestions!
I basically think that the second bullet point causes the problems ... That is why I believe that the error occurs at the MySQL Server rather than at the Java Connection Pool/ ThreadExecutor. I also heared that MySQL 5.5 has better support for InnoDB locking? Is it true?(I'm still using 5.1.X) – Vilius Nov 12 at 19:49.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.