On Fri, 15 Nov 2002, McCune, Bob (BLM) wrote:
> Date: Fri, 15 Nov 2002 10:47:27 -0600 > From: "McCune, Bob (BLM)" <[EMAIL PROTECTED]> > Reply-To: Jakarta Commons Users List <[EMAIL PROTECTED]> > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > Subject: DBCP & JNDI Binding > > I am in the process of redesigning the model tier of our Swing/CORBA > application to be more J2EE-compliant and would like to be able to access > the database connection pool via JNDI. Since none of the DataSource > implementations of the DBCP packages are Serializable or Referenceable, how > do you bind a DataSource to a JNDI context? > You might find it useful to examine how Tomcat 4.1 does this (which happens to use commons-dbcp). It uses a single-JVM in-memory JNDI context (so there's no need to serialize). Of course, the data source is only available within that JVM. I would imagine that multi-JVM containers probably create a data source in each JVM that is configured identically, rather than trying to pass a single instance around. But you'd have to look at the code of such a server to be sure. Craig -- To unsubscribe, e-mail: <mailto:commons-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:commons-user-help@;jakarta.apache.org>
