users@glassfish.java.net

Re: COnnection Pool Datasource from Glassfish

From: <glassfish_at_javadesktop.org>
Date: Tue, 11 Mar 2008 07:01:17 PST

Yes it is not the best practise to use te above code and that is very reason for my question to access DB Connpool through JNDI lookup .

Like the Java link that differentiates DS from CPDS if Glassfish does internal type casting to DataSource then why would the DB get that max connection reached if it was coming from the connection pool then it should'nt be hitting so many connections on the DB physical connections ,if it was from the pool they are just instances of physical connections and they should have been re-used from the Pool but that was not happening which is why it reached max .

For now I have the singleton design pattern so that only one instance get used but I still doubt using the Datasource with JNDI lookup would still be getting physical connections not logical connections now since we are on Test no serious problem yet ,should watch for production behaviour , however could you please refer to the spec or document that states that all Connection pools are type casted to Datasource type - will be a great help !!

thanks,
Meena
[Message sent by forum member 'md7777' (md7777)]

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