Oracle GlassFish Server 3.0.1 Application Development Guide

Wrapping Connections

If the Wrap JDBC Objects option is true (the default), wrapped JDBC objects are returned for Statement, PreparedStatement, CallableStatement, ResultSet, and DatabaseMetaData.

This option ensures that Statement.getConnection() is the same as DataSource.getConnection(). Therefore, this option should be true when both Statement.getConnection() and DataSource.getConnection() are done.

You can specify the Wrap JDBC Objects option in the following ways: