• 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

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 ?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic