Quoting Benoit Marchal <[EMAIL PROTECTED]>: > > To be more specific about what we are trying to do, we are using > Webcream to make our java application web enable (see www.creamtec.com). > Webcream is working well but we had to make the rendering job done in a > separate JVM that communicate with Tomcat through RMI (I don't have > access to that communication channel). Basically each client that > connect to our Web enabled java application will induce the creation of > a separate JVM. The problem is that we need to make connection with the > db from within the separate JVMs. Defining a new pool for each JVM is > not an option (too many connection opened then) and in that case using > no connection pool at all is even better. > > I have tried to communicate with the Tomcat DBCP through JNDI but I > haven't been successful so far (I am not an expert in JNDI anyway) >
I'm afraid you're going to have to take a different approach. The basic issue is that java.sql.Connection objects cannot be shared across JVMs. The same is true of objects that represent pretty much any operating system provided resource (such as files and sockets). One possible approach would be to create a webapp in Tomcat that performs the real database accesses, and then have your client app JVMs submit HTTP requests to this webapp when they need database work done. Essentially, the webapp acts like a "database proxy" for you. By the way, this is pretty much the design pattern for web services, so you might actually want to look at using something like JAX-RPC or XML-RPC for the communication between client apps and your server-side webapp doing the database work. > Benoit Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
