• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Connection pooling without the server

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I've been reading (a little) about connection pooling and have a few questions.

If I don't know the configuration of the connection ahead of time (i.e. because the user can configure it as part of the application) - how can I set up a pool?

It seems that pools are really performant if you know the details and can configure the settings on the application server - therefore providing a pool. What do you do if the connection configuration is sorted out at run-time for the application? Are connection pools out of the question?

If so - are there any alternatives?

Any pointers would be gratefully received.

All the best,

Steve
 
author
Posts: 4278
34
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think what you're asking is can you build a dynamic connection pool on the fly. I'd say it depends on what you are using for server software, but for the most part you can't. You could, alternatively, setup multiple connection pools to handle the different databases. This is way servers that change databases often require a restart, creating/deleting a connection pool affects everything on the server.

I would say think about why you need a dynamic connection pool more. The nature of connection pools is that they are psuedo-permanent, live on the server, and help minimize shared connections accross the server. Dynamic connections to databases are often limited in single use where having a connection pool would not help unless multiple people were using the same pool. But then the problem becomes what if you remove the pool while others are using it.
 
Steve Wood
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Scott,

That's the best answer I've heard to this question. The connections will need to be highly configurable and very few will be the same - it sounds like a connection pool is simply not an option.

All the best,

Steve
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic