[jboss-cvs] JBossAS SVN: r70164 - branches/Branch_4_2/connector/src/main/org/jboss/resource/adapter/jdbc.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 27 04:45:19 EST 2008


Author: vicky.kak at jboss.com
Date: 2008-02-27 04:45:19 -0500 (Wed, 27 Feb 2008)
New Revision: 70164

Modified:
   branches/Branch_4_2/connector/src/main/org/jboss/resource/adapter/jdbc/PreparedStatementCache.java
Log:
JBAS-1808 changes.

Modified: branches/Branch_4_2/connector/src/main/org/jboss/resource/adapter/jdbc/PreparedStatementCache.java
===================================================================
--- branches/Branch_4_2/connector/src/main/org/jboss/resource/adapter/jdbc/PreparedStatementCache.java	2008-02-27 09:43:36 UTC (rev 70163)
+++ branches/Branch_4_2/connector/src/main/org/jboss/resource/adapter/jdbc/PreparedStatementCache.java	2008-02-27 09:45:19 UTC (rev 70164)
@@ -47,7 +47,10 @@
       private final int type;
       private final int resultSetType;
       private final int resultSetConcurrency;
-
+      
+      public String getSql(){
+    	  return sql;
+      }
       public Key(String sql, int type, int resultSetType, int resultSetConcurrency)
       {
          this.sql = sql;
@@ -151,4 +154,16 @@
          super.ageOut(entry);
       }
    }
+   
+   public String toString()
+   {      
+      String s = " PreparedStatementCache size: " + m_list.m_count;
+      for (LRUCacheEntry entry = m_list.m_head; entry != null; entry = entry.m_next)
+      {
+    	 CachedPreparedStatement ws = (CachedPreparedStatement) entry.m_object;
+    	 PreparedStatementCache.Key key = (PreparedStatementCache.Key) entry.m_key;    
+         s += "[" + key.getSql() + "] ";
+      }
+      return s + "\n";
+   }
 }




More information about the jboss-cvs-commits mailing list