This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

how many initial connections should be opend  RSS feed

 
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am developing an application for intranet.

so in the intranet there will be 30-40 ppl will login to this application

so i need to use connection pooling

i am using this ready made class file for connection pooling
so the problem is how many initial connections should be opend?


thanks in advance



i am using this class file



is this code enough for creating connectionpooling ?
or should i go for other ?


please help me out


thanks
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most containers provide a connection pool for you.
Which one are you using?
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:
Most containers provide a connection pool for you.
Which one are you using?



i am using tomcat 4.0
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup. Tomcat provides connection pooling. Read the documentation.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One suggestion, if you have planned to use this Connection pool code in your production environment, please have a look at the whole getConnection() method is synchonized.. i think this will hit the performance considerably.. please use synchronized blocks inside the method, wherever required..
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mate, you are pretty carefree with your passwords.
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by CM Ananth:
One suggestion, if you have planned to use this Connection pool code in your production environment, please have a look at the whole getConnection() method is synchonized.. i think this will hit the performance considerably.. please use synchronized blocks inside the method, wherever required..



so i should alwasy prefer synchronized blocks over synchronized methods in all the cases??? thanks!!!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!