This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Re Connection pooling

 
kwame Iwegbue
Ranch Hand
Posts: 197
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
stu derby
Ranch Hand
Posts: 333
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Martin Simons
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should not your resource ref be jdbc/EmployeeDB and not jdbc/DB ?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic