Works for me,
bur better try setting:
public void stopService() {
_lServer.invoke(
_lTimer.getObjectName(),
"removeNotification",
new Object[]{ _efdCleanupTimer },
new String[]{ _efdCleanupTimer.getClass().getName() }
);
}
Regards,
Burkhard
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 3:07 AM
Subject: [JBoss-user] Use of "removeNotification" in Timer MBean
> Hi there all,
> Following the Timer MBean example in chapter 13 of the online
> manuals, I have a working example of the Timer MBean.
>
> However, I'm having difficulty in getting the
> "removeNotification" part to work.
>
> I'd placed the removeNotification bit in the
> stopService function ie.
> public void stopService() {
> _lServer.invoke(
> _lTimer.getObjectName(),
> "removeNotification",
> new Object[]{
> _efdCleanupTimer
> },
> new String[]{
> Integer.TYPE.getName()
> }
> );
> }
>
> From the MBean view (from URL://localhost:8082),
> when I click on stop for this MBean,
> I get the following error message.
> #--- cut here
>
> [Housekeeper] 15 Mar 2002 18:48:21 INFO [Thread-30]- Stopping
> [Housekeeper] 15 Mar 2002 18:48:21 DEBUG [Thread-30]- Stopping the
> housekeeper
> javax.management.ReflectionException: The operation with name
> removeNotification could not be found
> at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1620)
> at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> at
>
au.com.ot.openci.notification.housekeeping.Housekeeper.stopService(Housekeep
> er.java:270)
> at
> org.jboss.util.ServiceMBeanSupport.stop(ServiceMBeanSupport.java:138)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> at
> com.sun.jdmk.comm.HtmlInvokePage.buildPage(HtmlInvokePage.java:240)
> at
>
com.sun.jdmk.comm.HtmlRequestHandler.processGetRequest(HtmlRequestHandler.ja
> va:325)
> at
>
com.sun.jdmk.comm.HtmlRequestHandler.processRequest(HtmlRequestHandler.java:
> 152)
> at
> com.sun.jdmk.comm.HtmlRequestHandler.doRun(HtmlRequestHandler.java:79)
> at com.sun.jdmk.comm.ClientHandler.run(ClientHandler.java:84)
> at java.lang.Thread.run(Thread.java:484)
>
> #--- end here
>
> Did I miss doing something?
> Should I be overriding this function somewhere?
> I've read the examples about 5 times but suspect I'm subconciously
> skipping some important part everytime.
>
> I am using JBoss 2.4.4 with Tomcat 4.0.1 on Win NT 4.0 (SP6a)
> with jdk 1.3.1
>
> Many thanks in advance,
> Chai
> --
> | mailto:[EMAIL PROTECTED] | +61 401 688 408
> | http://www.ozemail.com.au/~calcium
> | It's not denial. I'm just very selective about
> | what I accept as reality - Calvin and Hobbes
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user