Notification Listeners are not required to be thread safe, although they can be. If I allow concurrent notifications in the timer and the listener is synchronized and slow, it is likely to produce thread death as more and more threads wait at the handler's entry point.
I think the best approach is not to produce concurrent notifications. Instead I'll keep a backlog per listener of up-to 50 notifications, after that, the notifications are dropped with a warning. If it gets to 50, it is probably misconfiguration or a bug in the listener. Just for clarification: When it says listener above, it actually means listener and timer notification id. Regards, Adrian >From: "Andreas Schaefer" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> >CC: <[EMAIL PROTECTED]> >Subject: Re: [JBoss-dev] Re: Scheduled MBeans (Suggested Patch) >Date: Wed, 10 Apr 2002 09:51:24 -0700 > >Hi > > > A Threadpool based notifiction broadcaster, sounds good ;-) > > > > Should I allow concurrent notifications to a listener? This is not > > possible at the moment. > > Stopping concurrent notifications will require storing a backlog > > against the listener registration. This could cause a resource problem > > with slow listeners. > >Good question after all. I don't think concurrent notification to a >listener >is a good idea or should a notification listener be thread safe ? > >Andy > > _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
