users@glassfish.java.net

Re: Is is possible to do per user database connection pooling with Glassfis

From: <glassfish_at_javadesktop.org>
Date: Wed, 22 Aug 2007 09:49:47 PDT

Actually, I did verify my commets where correct before posting [using Sun Java System Application Server 9.1 (build b58-rc1)].

I reduced the timeout on idle connections to 30 sec and the miniumum number of connections to zero and verified when no connections were held in the pool (verfified this by looking at the database server), the next use of the pool makes a few new connections with the specified username. Subsequent connections under a different name simply reuse these connections and run under the original user name, regardless of what "getConnection" specifed for the username. After the idle timeout, only the next request's username is honored.

The database server is Sybase 12.5, and the test query just returns the login information of the user that owns the connection.
[Message sent by forum member 'hanafey' (hanafey)]

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