This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can statement be used in multi-thread?

William Yan
Ranch Hand
Posts: 69
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
I am new to JDBC,
I wonder if the statement can be used in multi-thread. I mean i create a statement object by Connection. And pass the reference to mutli-thread, then mutli-thread uses the statement to executeQuery, can it work? And can preparedStatement work that way?

I know Connection can be used concurrently by many users, but how many is appropriate?

Thank you in advance,
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic