• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Re Connection pooling

 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I know conn.close() returns the Connection to the pool, but does ds.getConnection() get a new Connection or simply get one from the pool. If so, at what point is a new Connection made?
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The pool decides whether to reuse an existing connection or create a new one. It does so based on the way the pooling code was written, and the way you configure it.
 
kwame Iwegbue
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks stu..

the code above doesn't seem to be working for me though!



initCtx cannot be resolved

I'm using the code below in Tomcat 5.5






I tried placing <Context> in /META-INF/context.xml, then i tried placing it CATALINA_HOME/conf/server.xml and niether is working??

My web.xml has this (I'm using Servlet 2.4/ J2SE 1.5)



[ June 09, 2006: Message edited by: kwame Iwegbue ]

[ June 09, 2006: Message edited by: kwame Iwegbue ]
[ June 09, 2006: Message edited by: kwame Iwegbue ]
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Should not your resource ref be jdbc/EmployeeDB and not jdbc/DB ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic