• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

jdbc connection pooling

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, I have a situation where there are 3 applications , which are just components , I mean which do not run under any application server, So I need to create a component for all the 3 apps to use a connection pool, and all the 3 apps should use the connection pool component , I mean as one point of control to the database , supplying individual jars wont solve this problem, I guess, then it becomes 3 point of entry's.Please share your thoughts on how to make this possible.

Thanks
Pradeep
 
author & internet detective
Posts: 42109
934
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pradeep,
Why can't you have 3 connection pools?
 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,
I just gave an example of 3 applications, in future there can be 'n' applications , and I guess there can not be 'n' connection pools , and since the database can not scale 'n' * 50 connections, incase the connection pool component holds a MAX of 50 connections in the worst case.

Thanks
Pradeep
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


and since the database can not scale 'n' * 50 connections


Why not?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Praddep,

I have some doubt over the design.

1. If you implement one connection pool for all of them then you will not able to secure some connection for each application, i.e. a situation may arise that all the connections are used up by one application and other two are not getting any chances (This depends on traffic expected)

2. So if you can take into account above you pretty much cannot guarantee the performance and availability of any of the application.

Instead I will suggest analyse the traffic expected on each application, hence possible load on database in peak time. Depending on above you will have a better chance of maintaining SLA for the application at least from db access point of view. Using this data create three different resource pools setting up min and max connections on each application separately.

I can see the point of single access but if the concern is max number of connections created on DB side, this can be controlled in much simpler way.

Regards,
Ashutosh
 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul,Ashutosh,Jeanne,
Understood all your thoughts, Will talk to my architect and see why he wants one point of entry into the pool, and will get back to you.

Thanks for your time.
Pradeep
 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have found something that might be of interest to you guys, http://vjdbc.sourceforge.net/, it is an rmi based call to get a connection object.Please let me know what you think abt it, I have created a sample pilot and seems to work fine, I am not able to think beyond what it does, Please advice / suggest what you think about it.

Thanks
Pradeep
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic