users@glassfish.java.net

JDBC Connection Pool which settings take precedence and what is the proper

From: <forums_at_java.net>
Date: Sat, 29 Sep 2012 02:53:43 -0500 (CDT)

Hey pips, I am using GlassFish 3.1.2.2 with Informix Dynamic Server 11.10FCx.
I am trying to setup a JDBC connection pool using the latest version of the
Informix JDBC drivers (3.70.JC9). I've created the pool as
javax.sql.ConnectionPoolDataSource resource using the
com.informix.jdbcx.IfxConnectionPoolDataSource dataSource class and the
com.informix.jdbc.ifxDriver driver. This kind of resource has like 30
addition properties, most of which are useless to me. What is confusing is
that it has the following additional properties(taken from the domain.xml
file for easier reading): property name="InitialPoolSize" value="0">property
property name="MinPoolSize" value="0">property property name="MaxPoolSize"
value="50">property ... property name="IfxCPMInitPoolSize" value="0">property
property name="IfxCPMMinPoolSize" value="0">property property
name="IfxCPMMaxPoolSize" value="50">property ... property
name="IfxCPMMaxConnections" value="-1">property> So which settings take
precedence? The ones in the General tab of the GF admin console, or the
properties with or without IfxCPM in the beginning? Why do we have 3
different properties for the at a glance the same settings ? And why we have
one additional setting to limit the max number of connections(which should be
limited by the MaxPoolSize already ?..?) And my second question is what is
the proper way of getting the dataSource ? What I do is: I call the
ic.lookup() for the JNDI resource mapped to the JDBC connection pool and I
cast that object to javax.sql.dataSource object. I think I tried casting it
to javax.sql.ConnectionPoolDataSource first but it failed. So is taking a
dataSource object making that dataSource not pooled ?

--
[Message sent by forum member '2g4u']
View Post: http://forums.java.net/node/890834