Bugs item #871649, was opened at 2004-01-06 08:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=871649&group_id=22866

Category: JBossMX
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Haynie (jhaynie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem with source of JMX Notifications

Initial Comment:
According to the JMX spec, the source of a Notification 
must be of type ObjectName.

At line 420 in ServerImpl:

Notification msg = new Notification
(START_NOTIFICATION_TYPE, this, 1);

should be changed to:

Notification msg = new Notification
(START_NOTIFICATION_TYPE, 
ServerImplMBean.OBJECT_NAME, 1);


We should also update JMX to check this (although I 
thought it did before - maybe its happening at the at a 
higher level in the BasicMBeanRegistry).

The problem is that the ListenerRegistration in the 
NotificationBroadcasterSupport.sendNotification() will 
evaluate the NotificationFilter before being dispatched 
up to the listener. The listener is being wrapped at a 
higher level by the mbean server using the 
NotificationListenerProxy which sets the source - but 
this happens after the filter is applied  -- which causes 
problems if you're checking the ObjectName in the filter.

An easy enough fix for this particular problem is just to 
do above.  However, I'm worried we'll still see this in 
other places.  Another thought is to wrap the 
MBeanServerListenerRegistration (which creates 
NotificationListenerProxy) and pass in a proxy to the 
filter, such that it will set the appropriate source using 
the MBeanServerListenerRegistration and then delegate 
to the appropriate filter.

The other thing is to enforce in our Notification 
implementation ObjectName in setSource and the 
constructor -- which according to the JMX spec we're 
suppose to throw an IllegalArgumentException.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=871649&group_id=22866


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to