tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r799400 - in /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool: ConnectionPool.java jmx/ConnectionPoolMBean.java
Date Thu, 30 Jul 2009 18:29:30 GMT
Author: markt
Date: Thu Jul 30 18:29:30 2009
New Revision: 799400

URL: http://svn.apache.org/viewvc?rev=799400&view=rev
Log:
Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=47577
Imports / casts

Modified:
    tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
    tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java

Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=799400&r1=799399&r2=799400&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original)
+++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Thu
Jul 30 18:29:30 2009
@@ -161,7 +161,7 @@
      */
     public Connection getConnection() throws SQLException {
         //check out a connection
-        PooledConnection con = (PooledConnection)borrowConnection(-1);
+        PooledConnection con = borrowConnection(-1);
         return setupConnection(con);
     }
 
@@ -770,9 +770,9 @@
      */
     protected boolean shouldAbandon() {
         if (poolProperties.getAbandonWhenPercentageFull()==0) return true;
-        float used = (float)busy.size();
-        float max  = (float)poolProperties.getMaxActive();
-        float perc = (float)poolProperties.getAbandonWhenPercentageFull();
+        float used = busy.size();
+        float max  = poolProperties.getMaxActive();
+        float perc = poolProperties.getAbandonWhenPercentageFull();
         return (used/max*100f)>=perc;
     }
     

Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java?rev=799400&r1=799399&r2=799400&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java
Thu Jul 30 18:29:30 2009
@@ -15,8 +15,6 @@
  */
 package org.apache.tomcat.jdbc.pool.jmx;
 
-import java.util.Properties;
-
 import org.apache.tomcat.jdbc.pool.PoolConfiguration;
 
 public interface ConnectionPoolMBean extends PoolConfiguration  {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message