Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Connectionpooling with Oracle.

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi FOlks,
I'm developing an application that uses Oracle as the back-end. It has a web component with jsp's and servlets and an application component where I have modelled several entities and have some main() programs.
Lets say for arguement that I have an class called Card. In its constructor, I make a connection to the db.

My JSP's pick up connections from a connectionpool which is in the application servlet context. But when they instantiate a Card object,
Card card = new Card() ;
it makes a new connection to the db causing me overhead and unacceptable response times while stress testing.
Any suggestions to improve my design would be appreciated.
Thanks in advance.
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So when you get a connection from the pool directly in the jsps, it works and the connection pool hands out an existing connection, but when the jsps instantiate a new card object, the card object constructor requests a connection from the pool but the pool opens a new connection for it?
Sounds weird. Are you sure your pool is pooling enough open connections? Try a higher setting.

Adam
 
It's feeding time! Give me the food you were going to give to this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic