----- Original Message -----
From: "Robert J. Carr" <[EMAIL PROTECTED]>
To: "Derby Discussion" <[email protected]>
Sent: Tuesday, June 03, 2008 9:04 PM
Subject: Re: embedded db and connection pooling
Hey Kristian-
Thanks for the response, here's some comments:
Do you delete the files on disk and connect to the same database (again),
or
are you creating a brand new database (with a different name /
directory)?
I will admit that what I was doing was illogical and I never should
have expected it to work. I was basically deleting the database files
between deployments of my web application. Since I switched to jndi
data sources, where tomcat now owns the connection not my web app,
this will no longer work.
http://www.pinkdragon.net/doc_lib/contents/en/tomcat_6_0/jndi-resources-howto.html
Robert, read the second paragraph... "per webapp basis"
This is what I think... if its set up for a global resource TC thinks you
using the dB across all webapps.
So the pool is set up and remains setup even when a new webapp is added.
In this case, deleting the dB and rebuilding is bad news because TC is still
using it.
But on a "per webapp" basis, you undeploy, do what you will, and on a
redeploy, the connections a remade for that webapp only.
It seems to just depent on whether you have the JNDI setup in sever.xml
(global) or web-inf/context (webapp only)
Have fun...
ps if you want a independent dB pool... can steal the lib and demo code here
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------