users@glassfish.java.net

Is is possible to do per user database connection pooling with Glassfish?

From: <glassfish_at_javadesktop.org>
Date: Wed, 22 Aug 2007 07:43:13 PDT

It is easy to set up a DB connection pool, but the built in implementation does not do per user pooling like is provided by org.apache.commons.dbcp.datasources.PerUserPoolPoolDataSource.

I could not see how to add a custom connection pool under "Resources / JDBC", and an attempt to add a resource under "Resources / JNDI / Custom Resources" did not work. I'm not sure, but the logs seemed to suggest the JNDI name was put under "custom:" and not "java:comp/env", which could explain why the name was not resolvable via a resource-ref in web.xml given that these names always assume "java:comp/env" namespace.

For applications that depend on database access controls, it is vital that the connection pool be per user based, so the question is how to do that with the Glassfish app server.
[Message sent by forum member 'hanafey' (hanafey)]

http://forums.java.net/jive/thread.jspa?messageID=232008