This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

addBatch and executeBatch

jacq carballo
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are the addBatch and executeBatch commands thread-safe? i mean, if i have 10 threads adding sql statements to the addBatch methods, and then i suddenly made an executeBatch (after 20 sql statements added to the batch). will the next input to addBatch affect the executeBatch.
for example, if the executeBatch is alrd executing the 20 sql statements and one thread adds 1 sql statement to the addBatch, will the executeBatch execute 21 sql statements or just the 20 sql statements?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!