FileDocCategorySizeDatePackage
PreparedStatementCache.javaAPI DocJBoss 4.2.14743Fri Jul 13 21:01:14 BST 2007org.jboss.resource.adapter.jdbc

PreparedStatementCache

public class PreparedStatementCache extends org.jboss.util.LRUCachePolicy
LRU cache for PreparedStatements. When ps ages out, close it.
author
Bill Burke
author
Adrian Brock
author
Scott.Stark@jboss.org
version
$Revision: 57189 $

Fields Summary
private final Logger
log
Constructors Summary
public PreparedStatementCache(int max)

      super(2, max);
      create();
   
Methods Summary
protected voidageOut(LRUCachePolicy.LRUCacheEntry entry)

      try
      {
         CachedPreparedStatement ws = (CachedPreparedStatement) entry.m_object;
         ws.agedOut();
      }
      catch (SQLException e)
      {
         log.debug("Failed closing cached statement", e);
      }
      finally
      {
         super.ageOut(entry);
      }