On 15 Dec, Toby Allsopp wrote:
> I ran into this the other day and I would have posted a patch today if I
> hadn't been busy yesterday. I just added an if (... instanceof ...)
> after the else and all was well (with extremely little testing).
You meen in ServiceControl? Shure, that is one way of doing it, but it
still means an extra call to ServiceControl - wich should not happen in
the first place - an which do not happen with the Timer MBean.
Richard, you wrote the logging code, did you not? Any experiences on
this when you did that?
//Peter
>
> Toby.
>
> [EMAIL PROTECTED] wrote:
>>
>> Hi,
>> I have run into a strange problem:
>>
>> I am using the notification mechanism in JMX to bind together an
>> external even generating source with Message Driven Beans. But I stumble
>> across a ClassClastException at
>> org.jboss.util.ServiceControl.handleNotification(ServiceControl.java:167).
>>
>> What I am basically doing is starting an MBean wich act as a go between.
>> I register a listener with it with a specific filter, and then it
>> invokes sendNotification(pn) when an interesting event has occured.
>>
>> The event commes through OK, but it also ends up in ServiceControll,
>> where (without any checks) the class tries to cast it to a
>> MBeanServerNotification.
>>
>> The strange thing is that I have done exactly the same with the Timer
>> MBean, and there it work perfectly OK; nothing slips through to
>> ServiceControl. The only difference is that a TimerNotification is a
>> core notification and that I for the above problem use a Notification of
>> my own (a subclass of Notification)
>>
>> (Yeah this is cool, timer driven calls to MDB, where the MDB are sort of
>> acting as listeners for other beans who places stuff in the timer to be
>> executed at some specific point - there are so many things you can do
>> with jboss when you get to know it a little...).
>>
>> Any one experienced this problem?
>>
>> And should ServiceControl realy take for granted that everyting which is
>> not an AttributeChangeNotification always is an MBeanServerNotification?
>>
>> //Peter
>> --
>> ------------------------------------------------------------
>> Peter Antman Technology in Media, Box 34105 100 26 Stockholm
>> Systems Architect WWW: http://www.tim.se
>> Email: [EMAIL PROTECTED] WWW: http://www.backsource.org
>> Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942
>> ------------------------------------------------------------
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
Jobba hos oss: http://www.tim.se/weblab
------------------------------------------------------------
Peter Antman Technology in Media, Box 34105 100 26 Stockholm
Systems Architect WWW: http://www.tim.se
Email: [EMAIL PROTECTED] WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942
------------------------------------------------------------
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]