Posts

Showing posts from December, 2010

JDBC-4 hot features:

Stale connections ---isvalid():   Because a stale connection does not necessarily mean a closed connection (which might be garbage collected), connections that became unusable often took up those valuable connection resources. A new method in JDBC 4's Connection class, isValid(), allows a client to query the database driver if a connection is still valid. This allows a more intelligent management of connection pools by clients.   Preparedstaement pooling---poolable property:   While one database connection is indistinguishable from another, the same does not hold for statements: Some SQL statement are more frequently used than others in any application domain. Prior to JDBC 4, there was no way to tell such statements apart in a statement pooling environment. While every JDBC 4 PreparedStatement is poolable by default, the new poolable property allows an application to offer a hint to the statement pooler as to whether a statement should be pooled. This allows an application d