Package bitronix.tm.resource.jdbc.LruStatementCache

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


    public PreparedStatement prepareStatement(String sql) throws SQLException {
        enlistResource();

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


    public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
        enlistResource();

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

    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
        enlistResource();

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

    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
        enlistResource();

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

    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

    public PreparedStatement prepareStatement(String sql) throws SQLException {
        enlistResource();

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

    public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
        enlistResource();

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

    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
        enlistResource();

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

    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
        enlistResource();

        if (useStatementCache) {
            CacheKey cacheKey = new CacheKey(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
            PreparedStatement cachedStmt = jdbcPooledConnection.getCachedStatement(cacheKey);
            if (cachedStmt == null) {
                PreparedStatement stmt = delegate.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
                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.