Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection pooling

 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In PHP it was easy; no bothering with connection pooling.
I wrote my scripts like I was the only one on the Internet.
But with Java and Servlets it seems to be pretty much different.
1) Do I have to worry about connection pooling at all when I implement SingleThreadModel interface???
2) Is it very very recommended to use connection pooling when SingleThreadModel interface is not used???
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i would advise against using the SingleThreadModel.
it is mainly suited for small sites with not much traffic.
aside from that , yes copnnection pooling is the way to go in my opinion cause it is the middle ground between resources usage and clients number.
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well why will one need to use a connection pool if u are using a singleThreadModel.As there would be seperate instances handling the request and each of those instance would by default associate itself with seperate connections.On the other way round if we do make a pool of connections and keep it to be readily picked up by the instances, once the instance dies it doesn't releases the connection but destroys all the resources used by it , so there seems to be no point in using a pool
 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any Connection Pool capability in mm-mysql driver, or in some other JDBC MySQL driver?
 
Justin Chu
Ranch Hand
Posts: 209
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Velika Srbija:
Is there any Connection Pool capability in mm-mysql driver, or in some other JDBC MySQL driver?

Connection pooling is already implemented by most java app servers.
At least, I know tomcat and resin implements DataSource that are already pooled.
Chu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic