This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc connection pooling

 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • 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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

Why not?

 
Ashutosh Gawande
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic