• 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 to do connection pooling in core java without using external library

 
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to do connection pooling without using external library? I know that there are libraries like DNCB available but without using them how to do connection pooling?

thanks
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Those connection pools are written in Java, you know. So that means that to do connection pooling in core Java without using an external library, you'd write a connection pool in Java, just like those other people did. I'm not sure why you would want to do that, though. It would be a lot of work for no apparent benefit.
 
Ranch Hand
Posts: 165
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Absolutely.
Monica, why do you want to re-invent the wheel? Go for plain JDBC API for better performance if that is your concern and not interested in ORM
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Go for plain JDBC API for better performance if that is your concern and not interested in ORM


If performance is indeed the driving concern, then using plain JDBC over ORM may help. Or it may not. Just as using connection pools may help, or they may not. Too much depends on the circumstances (about which we know nothing) to make blanket statements like this. More likely some performance tuning on the DB and DB server would make a bigger difference. But this is idle speculation, since we don't know that performance has anything to do the issue; my guess is it doesn't.
 
reply
    Bookmark Topic Watch Topic
  • New Topic