Hi all,

within an OSGi framework, we are trying to enable several servlets developed
on top of Jetty to concurrently communicate with a MySQL DB while preserving
performance and reliability. our current implementation suffers from the
problem of sharing a single DB connection across multiple threads causing
random exceptions to be thrown when several threads try to get a hold of the
connection. This is mainly because our DBManager is an OSGi service with
only one connection to the Database which gets tracked by our single
WebManager bundle . The WebManager then binds several servlets to the Pax
Web implementation of Jetty and passes the DBManager object along. And
problems occur when several clients hit these servlets simultaneously.

I am looking for some best practices in combining DBCP and JNDI with Pax Web
in order to resolve this issue and make the whole process more thread safe.
I would very much appreciate it if somebody could refer me to some existing
"source code"/"best practices documentation" in order to shed some light on
how this combination can best be realized and implemented within an OSGi
framework.

thanks a lot,
-Nima

-- 
http://nima.magic.ubc.ca

Reply via email to