Package bitronix.tm.resource.jdbc.LruStatementCache

Examples of bitronix.tm.resource.jdbc.LruStatementCache.CacheKey


    public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
        enlistResource();

        if (useStatementCache) {
            CacheKey cacheKey = new CacheKey(sql, columnIndexes);
            PreparedStatement cachedStmt = jdbcPooledConnection.getCachedStatement(cacheKey);
            if (cachedStmt == null) {
                PreparedStatement stmt = delegate.prepareStatement(sql, columnIndexes);
                cachedStmt = JdbcProxyFactory.INSTANCE.getProxyPreparedStatement(jdbcPooledConnection, stmt, cacheKey);
                jdbcPooledConnection.putCachedStatement(cacheKey, cachedStmt);
View Full Code Here


    public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
        enlistResource();

        if (useStatementCache) {
            CacheKey cacheKey = new CacheKey(sql, columnNames);
            PreparedStatement cachedStmt = jdbcPooledConnection.getCachedStatement(cacheKey);
            if (cachedStmt == null) {
                PreparedStatement stmt = delegate.prepareStatement(sql, columnNames);
                cachedStmt = JdbcProxyFactory.INSTANCE.getProxyPreparedStatement(jdbcPooledConnection, stmt, cacheKey);
                jdbcPooledConnection.putCachedStatement(cacheKey, cachedStmt);
View Full Code Here

TOP

Related Classes of bitronix.tm.resource.jdbc.LruStatementCache.CacheKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.