All Forums Connectivity
r20078c 1 post Joined 10/10
25 Oct 2010
Volatile tables and pooledconnections

We are using the PooledConnections using V13 versions of the JDBC driver and have noticed that the volatile tables seem to stay even when we call the close method on the connection.

TeraConnectionPoolDataSource dataSource = new TeraConnectionPoolDataSource();
.. do connection
PooledConnection pc = dataSource.getPooledConnection();
Connection conn= pc.getConnection();
Statetment st= conn.createStatement();
st.execute( Create volatile table);
.. execute somemore inserts and selects
conn.close(); // AT ths point the volatile table should go away.

But if we do
Statetment st= conn.createStatement();
st.execute(select from the previously created volatile table); It still reutns data.

But if we close the pooledconnection (pc)
It behaves well. But we lose the advantage of pooled connections.

It is as if pooledCOnnections are not closing the sessions.

Is there a way to close the session without closing the connection.

tomnolan 594 posts Joined 01/08
26 Oct 2010

First, please note that TeraConnectionPoolDataSource is not intended for use by applications. It is intended for use by the connection pool feature of an application server such as WebSphere.

The PooledConnection.getConnection method returns a logical connection. Calling the logical connection's close method does not close the underlying physical connection, nor does it discard any volatile tables.

You must sign in to leave a comment.