Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6133629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:15:14+00:00 2026-05-23T17:15:14+00:00

Im developing a multi-threaded application in which different threads are required to update the

  • 0

Im developing a multi-threaded application in which different threads are required to update the database concurrently. Hence,i passed a new statement object to each thread, while creating it(to avoid locking,if i send a single object). My doubts are :

  1. Is there a limit on the number of statement objects that could be obtained from a single jdbc connection ? would the database connection fail if i create too many statement objects ?

  2. If i close the statement properly before the thread dies out,what would be the number of threads that can be spawned at a time (on a system with 512Mb RAM) ?

  3. Wouldn’t the driver update the database while keeping the data consistent,no matter how many statement objects i use to update the db parallelly ? i use mysql.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:15:14+00:00Added an answer on May 23, 2026 at 5:15 pm
    1. Practically the number of statement objects you would be able to create should suffice your needs. Then again, how much is “too many” in your case?
    2. The number of threads that can be created depends on a lot of factors. Do realize that these threads you create would be “OS level” threads and not real threads (assuming you have a dual core system, that would make it 2 hardware threads or 4 if hyper-threading is available). Profiling you would be of prime importance here to determine how many threads can be created before your system slows down to a crawl.
    3. This would depend on the locking mechanism used by the database. What are you aiming for; high integrity or high performance? Read this.

    IMO, you would be better off looking up Connection objects from a connection pool in each of those threads rather than trying to pass around “statement” objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For my university class we are developing a multi-threaded Blackberry application which allows us
I am developing a multi-threading application, which is deadlocking. I am using Visual C++
When developing a new web based application which version of html should you aim
I'm developing a multi-threaded ASP.NET 3.5 application, during working with some file, I'm getting
I'm developing a multi threaded Unix application in C. Is there a simple way
I'm developing a long-running multi-threaded Python application for Windows, and I want the process
I'm currently developing a heavily multi-threaded application, dealing with lots of small data batch
I'm in the process of developing a multi-tiered financial processing application in Java using
I am developing a simple web application which contains these 3 components: client that
I'm developing an ASP.Net web application which makes use of MySQL via the MySQL-Provided

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.