public Connection getReadOnlyConnection() throws SQLException {
        try {
            Connection conn = dataSource.getConnection();
            setConnectionReadOnly(conn, true);
            return conn;
        } finally {
            if (logger.isDebugEnabled()) {
                logger.debug("Got connection from pool (" + toString() + ")");
            }
        }
    }
public Connection getReadOnlyConnection ( ) throws SQLException { try { Connection conn = dataSource . getConnection ( ) ; setConnectionReadOnly ( conn , true ) ; return conn ; } finally { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Got connection from pool (" + toString ( ) + ")" ) ; } } }
<p>
Gets the next available connection.  Connection is read-only, see
getReadWriteConnection() for performing updates
</p>

@return The next available connection.
@throws SQLException
If the maximum number of connections has been reached or there is
some other problem in obtaining the connection.