Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 97300 invoked from network); 31 Dec 2008 02:11:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Dec 2008 02:11:04 -0000 Received: (qmail 3491 invoked by uid 500); 31 Dec 2008 02:10:58 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 3424 invoked by uid 500); 31 Dec 2008 02:10:58 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 3413 invoked by uid 99); 31 Dec 2008 02:10:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Dec 2008 18:10:58 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_LOW,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dknoxy@mac.com designates 17.250.248.178 as permitted sender) Received: from [17.250.248.178] (HELO smtpoutw.mac.com) (17.250.248.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Dec 2008 02:10:48 +0000 Received: from webmail028 (webmail028-s [10.13.128.28]) by smtpoutw.mac.com (Xserve/smtpoutw003/MantshX 4.0) with ESMTP id mBV2AOiw012278 for ; Tue, 30 Dec 2008 18:10:24 -0800 (PST) Date: Tue, 30 Dec 2008 19:10:24 -0700 From: David Knox To: Tomcat Developers List Message-ID: <143218392751853249706531888386050619020-Webmail@me.com> in-reply-to: <200810161753.m9GHrb5B006293@site12.palmcoastd.dmz> references: <200810161753.m9GHrb5B006293@site12.palmcoastd.dmz> Subject: Re: svn commit: r730212 - in /tomcat/trunk/modules/jdbc-pool: build.xml sign.sh MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Received: from [72.42.97.87] from webmail.me.com with HTTP; Tue, 30 Dec 2008 19:10:24 -0700 X-Originating-IP: 72.42.97.87 X-Virus-Checked: Checked by ClamAV on apache.org Hi Filip, Of course, I think most would prefer the build wasn't broken :) I may be one of only a few people that watch and actually build the trunk. That aside, I wrote a little test to make sure introspection traverses the graph as I thought. NotificationBroadcasterSupport implements NotificationEmitter, where getNotificationInfo is described, the call works the same through the NotificationEmitter, NotificationBroadcasterSupport, implementation, and Method.invoke - the last definition is the one that's called and any call up the graph has to be explicit. Since that was so straight forward, I guessed that you want getNotificationInfo to be visible viz JMX instrumentation. But this has a straight forward solution too - so, finally, guessed that there's something I'm missing :) I changed ConnectionPool locally to get it to compile. I pasted the diff below. I've made a few assumptions and won't take it personally if wrong - I'm not committed to this solution. I think it does what you intended but I'm not sure I've covered the introspection aspect that you are concerned about. Index: ConnectionPool.java =================================================================== --- ConnectionPool.java (revision 730270) +++ ConnectionPool.java (working copy) @@ -42,7 +42,7 @@ } public ConnectionPool(org.apache.tomcat.jdbc.pool.ConnectionPool pool, boolean for16) { - super(getDefaultNotificationInfo()); + super(); this.pool = pool; } @@ -61,10 +61,18 @@ @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() { + private MBeanNotificationInfo[] getDefaultNotificationInfo() { String[] types = new String[] {NOTIFY_INIT, NOTIFY_CONNECT, NOTIFY_ABANDON}; String name = Notification.class.getName(); String description = "A connection pool error condition was met."; On Tuesday, December 30, 2008, at 02:34PM, "Filip Hanik - Dev Lists" wrote: >David Knox wrote: >> Hi, >> jdbc-pool doesn't compile using JDK5 (sun). >> >> [javac] /home/dknox/src/tomcat-trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java:45: cannot find symbol >> [javac] symbol : constructor NotificationBroadcasterSupport(javax.management.MBeanNotificationInfo[]) >> [javac] location: class javax.management.NotificationBroadcasterSupport >> [javac] super(getDefaultNotificationInfo()); >> >> The constructor NotificationBroadcasterSupport(MBeanNotificationInfo[]) doesn't exist in the JDK1.5 JMX package. The jdbc-pool module builds as one would expect with JDK6 >> >> Was this intentional? Maybe I've missed something? >> >yes it was, I can make it compile with 1.5 but then I will lose >information about the notifications through introspections. >It still runs with 1.5, I'm contemplating making it compile on 1.5, any >preferences? > >Filip >> >> -- knoxy >> >> >> On Tuesday, December 30, 2008, at 11:37AM, wrote: >> >>> Author: fhanik >>> Date: Tue Dec 30 10:37:07 2008 >>> New Revision: 730212 >>> >>> URL: http://svn.apache.org/viewvc?rev=730212&view=rev >>> Log: >>> Make sure that the packaged up binaries have a MD5 sum as well, to verify download size >>> >>> Modified: >>> tomcat/trunk/modules/jdbc-pool/build.xml >>> tomcat/trunk/modules/jdbc-pool/sign.sh >>> >>> Modified: tomcat/trunk/modules/jdbc-pool/build.xml >>> URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/build.xml?rev=730212&r1=730211&r2=730212&view=diff >>> ============================================================================== >>> --- tomcat/trunk/modules/jdbc-pool/build.xml (original) >>> +++ tomcat/trunk/modules/jdbc-pool/build.xml Tue Dec 30 10:37:07 2008 >>> @@ -23,7 +23,7 @@ >>> >>> >>> >>> - >>> + >>> >>> >>> >>> @@ -194,6 +194,11 @@ >>> destfile="${destdir}/apache-tomcat-jdbc-${version}.tar.gz"/> >>> >>> >>> + >>> + >>> + >>> + >>> + >>> >>> >>> >>> >>> Modified: tomcat/trunk/modules/jdbc-pool/sign.sh >>> URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/sign.sh?rev=730212&r1=730211&r2=730212&view=diff >>> ============================================================================== >>> --- tomcat/trunk/modules/jdbc-pool/sign.sh (original) >>> +++ tomcat/trunk/modules/jdbc-pool/sign.sh Tue Dec 30 10:37:07 2008 >>> @@ -1,4 +1,4 @@ >>> -VERSION=v1.0.12-beta >>> +VERSION=v1.0.13-beta >>> for i in $(find output/release/$VERSION -name "*.zip" -o -name "*.tar.gz"); do >>> echo Signing $i >>> echo $1|gpg --passphrase-fd 0 -a -b $i >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: dev-help@tomcat.apache.org >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: dev-help@tomcat.apache.org >> >> >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org >For additional commands, e-mail: dev-help@tomcat.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org