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

  • SEARCH
  • Home
  • 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 7806961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:42:04+00:00 2026-06-02T02:42:04+00:00

Does connection pooling db connections make sense when java code is called from a

  • 0

Does connection pooling db connections make sense when java code is called from a shell script, or is it better to use individual connections? Doesn’t the jvm exit after every call to the shell script, forcing the db pool/factory/etc to be re-created each time the script is called?

For example, I have an external process that makes calls to a shell script, this shell script then calls a java class which executes 1 or more DB operations (query, insert, update, delete.), depending on the invoked operation. This is a standalone batch process which does not use a servlet container like tomcat. This shell script gets called by my external process over and over.

My environment is a bash shell script calling a java application (main() method) which utilizes spring jdbc and commons-dbcp 1.4 for it db processing and pooling.

Thanks in advance!

  • 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-06-02T02:42:07+00:00Added an answer on June 2, 2026 at 2:42 am

    In your case, a connection pool probably only has a limited benefit, since you rightly said that whenever the JVM is shut down and started again, you would have to create the connection pool again. You could still use the pool if you want to benefit from using the DataSource interface instead of creating the connection directly. If your processing is done in a single thread, make sure that the size of the connection pool is only 1.

    If you’re using multiple threads in the same process, then the connection pool probably makes more sense and you could benefit from its features.

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

Sidebar

Related Questions

Hows does Drupal 6 interact with MySQL for connections and transactions? Does connection pooling
sp_reset_connection seems to be called by SQL Server connection pooling, to ensure that connections
I have some questions on connection pooling with java and an oracle db. From
dblink does not seem to work when I use a named connection to a
Does Google cap the number of connections a server can make to Google IMAP
I have an application that I use BoneCP for connection pooling and when I
So the question is does WCF4 invokes client connection pooling to WCF-service? For instance,
Is it necessary or advantageous to write custom connection pooling code when developing applications
Does or can DataWindow .NET take advantage of connection pooling?
I am going to configure c3Po configuration for connection pooling. what does below properties

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.