Re: Connection Pool JDBC 3.5
Posted in 2009
The result of my own investigations: You definititly have to use jndi in order to profit from informix connection pooling. Greetings Markus "Markus Bschorer" <mb@worxbox.com> schrieb im Newsbeitrag news:4af7cfc0$0$6733$9b4e6d93@newsspool2.arcor-online.net... > Hi all, > > IDS 11.5, JDBC 3.50 > > I tried to use connection pooling, without any JNDI-Registrations. > > IfxConnectionPoolDataSource cpds = new IfxConnectionPoolDataSource(); > cpds.setIfxIFXHOST(m_hostname); > cpds.setPortNumber(m_port); > cpds.setServerName(m_dbservername); > cpds.setUser(m_username); > cpds.setPassword(m_password); > cpds.setDatabaseName(m_databasename); > cpds.setIfxCPMInitPoolSize(500); > cpds.setIfxCPMMaxConnections(101); > cpds.setIfxCPMMinPoolSize(50); > cpds.setIfxCPMMaxPoolSize(100); > cpds.setIfxCPMAgeLimit(-1); > cpds.setIfxCPMMinAgeLimit(-1); > cpds.setIfxCPMServiceInterval(0); > > > All that seems to be OK, because > cpds.getPooledConnection().getConnection() returns a > IfxSqliConnReUsableConnection-Object, which works perfect. > > But when I close this connection, by "connection.close()", or > "((IfxSqliConnReUsableConnection)connection).scrubConnection()", the > connection-pool does not free that connection so that it can be reused. > Creating and closing more and more connections, results in exceeding the > maximal number of allowed connections. > > > Any Ideas? > Thanks for any hint! > > Greetings > Markus >