This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes connection pooling with firewall Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connection pooling with firewall" Watch "connection pooling with firewall" New topic
Author

connection pooling with firewall

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 193
Hi all,
I have a firewall which closes all the connections which are idle for 30 mins.So i have included the following connection pooling parameters inside my context file.
timeBetweenEvictionRunsMillis=300000
numTestsPerEvictionRun=20
minEvictableIdleTimeMillis= 180000
I also have maxActive=50
maxIdle=100
maxWait=-1
But still its not working.Can anybody have any suggestion in this regard.

regards,
Ajse
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

What server software are you using to manage the connection?


My Blog: Down Home Country Coding with Scott Selikoff
ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 193
Hi,
I am using Tomcat 5.x and dbcp connection pooling.
regards,
Ajse
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

I think for most of connection pools you can setup lifetime of connection. So set it shorter than firewall setting and you should be safe. I use this approach with success.


Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 193
Hi,
Can you pls specify how can i set the life time of the connection i.e which parameter we need in this case?
regards,
ajse
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41085
    
  43
I'm curious: Is the firewall between the servers and the outside world, or is it between segments of the internal network? The former would imply that there's JDBC traffic coming in over the Internet - I'd be interested to hear what lead to that architectural choice. If the latter, where does the need for a firewall between internal systems come from?


Ping & DNS - my free Android networking tools app
ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 193
Hi,

I dont have any control on these issues(firewall between internal servers).Probably this kind of settings can save the data in case of any hack.
But the problem is still there and not been fixed yet.
regards,
Ajse
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

Product companies always have problem like that. You can't dictate to customers how to configure firewall, otherwise they will get a product of your competitor which can manage such problems. I do not see lifetime for connection in your pool parameters. We used own pool and actually added this feature because met such requirements.
 
jQuery in Action, 2nd edition
 
subject: connection pooling with firewall
 
Similar Threads
How to Recreate Connection in the pool.
Spring and DAO
connection pooling clarification
Connection Pooling : which one should i use?
JDBC Connection Pooling Framework