• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JdbcTemplate and Multi-threading

 
Yile Ku
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a single JdbcTemplate and passing it into several threads to update multiple records (a thread per record) in a database. Eventually I get an exception saying the data base is closed.
Whats the right way to do this?
M-
 
T Mishra
Ranch Hand
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might be happening.
Concurrent update -> dirty reads -> JdbcTemplate throws SqlException -> JdbcTemplate closes connection
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic