You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2009/01/03 02:30:24 UTC

svn commit: r730885 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java

Author: fhanik
Date: Fri Jan  2 17:30:23 2009
New Revision: 730885

URL: http://svn.apache.org/viewvc?rev=730885&view=rev
Log:
Make system compile with JDK1.5

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

Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java?rev=730885&r1=730884&r2=730885&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java (original)
+++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java Fri Jan  2 17:30:23 2009
@@ -42,7 +42,7 @@
     }
 
     public ConnectionPool(org.apache.tomcat.jdbc.pool.ConnectionPool pool, boolean for16) {
-        super(getDefaultNotificationInfo());
+        super();
         this.pool = pool;
     }
 
@@ -61,8 +61,16 @@
     
     @Override 
     public MBeanNotificationInfo[] getNotificationInfo() { 
-        return getDefaultNotificationInfo(); 
-    }
+	MBeanNotificationInfo[] pres = super.getNotificationInfo();
+	MBeanNotificationInfo[] loc = getDefaultNotificationInfo();
+	MBeanNotificationInfo[] aug = new MBeanNotificationInfo[
+						pres.length + loc.length
+							];
+ 	System.arraycopy(pres, 0, aug, 0, pres.length);
+	System.arraycopy(loc, 0, aug, pres.length+1, loc.length);	
+	
+        return aug; 
+    } 
     
     public static MBeanNotificationInfo[] getDefaultNotificationInfo() {
         String[] types = new String[] {NOTIFY_INIT, NOTIFY_CONNECT, NOTIFY_ABANDON}; 



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