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. 

<svn diff>

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."; 



</svn diff>


On Tuesday, December 30, 2008, at 02:34PM, "Filip Hanik - Dev Lists" 
<devli...@hanik.com> 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, <fha...@apache.org> 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 @@
>>>   <!-- See "build.properties.sample" in the top level directory for all     
>>> -->
>>>   <property name="version.major"         value="1" />
>>>   <property name="version.minor"         value="0" />
>>> -  <property name="version.build"         value="12" />
>>> +  <property name="version.build"         value="13" />
>>>   <property name="version.patch"         value="-beta" />
>>>   <property name="version"               
>>> value="${version.major}.${version.minor}.${version.build}${version.patch}" 
>>> />
>>>   <!-- property values you must customize for successful building!!!        
>>> -->
>>> @@ -194,6 +194,11 @@
>>>           destfile="${destdir}/apache-tomcat-jdbc-${version}.tar.gz"/>
>>>     <delete file="${destdir}/apache-tomcat-jdbc-${version}.tar"/>
>>>     <echo message="Options +Indexes" file="${destdir}/.htaccess"/>
>>> +    
>>> +    <checksum file="${destdir}/apache-tomcat-jdbc-${version}.tar.gz" 
>>> forceOverwrite="yes" fileext=".md5" />
>>> +    <checksum file="${destdir}/apache-tomcat-jdbc-${version}.zip" 
>>> forceOverwrite="yes" fileext=".md5" />
>>> +    
>>> +    
>>>   </target>
>>>     
>>>   <!-- Download and dependency building -->
>>>
>>> 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-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>>>
>>>
>>>
>>>     
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>>
>>
>>   
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>
>

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

Reply via email to