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.
E.g. TeraConnectionPoolDataSource dataSource = new TeraConnectionPoolDataSource(); .. do connection PooledConnection pc = dataSource.getPooledConnection(); Connection conn= pc.getConnection(); Statetment st= conn.createStatement(); st.execute( Create volatile table); st.close(); .. execute somemore inserts and selects conn.close(); // AT ths point the volatile table should go away.
But if we do conn=pc.getConnection(); Statetment st= conn.createStatement(); st.execute(select from the previously created volatile table); It still reutns data.
But if we close the pooledconnection (pc) pc.close(); 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.
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.