Foo Shyn wrote:
Hi guys,
Currently i'm using Tomcat 4.1 and my application uses the Tomcat's DBCP to
connect to a Derby database.
However, since the Derby database only allow one application to connect to it
at a time, is it possible that i could configure the Tomcat's DBCP connection
so that other application (not web application) can uses it as well?
Any ideas and hints are welcomed.
Thanx.
Regards,
FooShyn
Hi Foo Shyn -
This is a common misconception caused by all the cautions in the Derby
documentation but, in your context, the warnings do not apply since you
are working with a Client-Server architecture (Tomcat). Derby is a
multi threaded, multi user system that multiple deployed applications
can safely use when it is embedded in a server architecture such as
Tomcat.
The key is to be sure that Derby is loaded by Tomcat in the same
classloader as the DBCP classes (COMMON) then have all applications
access Derby via DBCP datasources. The Derby website has a paper that
describes setting this up to run the JPetstore program. The datasource
created can be access by any program deployed to that server. Here is
the link to the Global Datasource setup instructions in the article:
http://db.apache.org/derby/integrate/DerbyTomcat5512JPetStor.html#Setup+of+Application+with+the+Datasource+in+the+Global+Context%3A
Hope this helps.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]