• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connectionpooling with Oracle.

 
Maky Chopra
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • 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.
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic