• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how many initial connections should be opend

 
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup. Tomcat provides connection pooling. Read the documentation.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic