MonitorAdmin - Unregistration of Monitorable causes IllegalArgumentException in
MonitoringJob
---------------------------------------------------------------------------------------------
Key: FELIX-811
URL: https://issues.apache.org/jira/browse/FELIX-811
Project: Felix
Issue Type: Bug
Components: Sandbox
Reporter: Martin Thelian
If a Monitorable service is unregistered from the framework but there is still
a scheduled MonitorJob monitoring StatusVariables of the unregistered
Monitorable, an IllegalArgumentException is thrown in the MonitoringJobImpl and
the whole MonitoringJob thread dies.
The stracktrace:
------------
|> Exception in thread "Thread-24" java.lang.IllegalArgumentException: no such
monitorable service for this pid
|> at
org.apache.felix.sandbox.monitor.MonitorAdminImpl$MonitorAdminProxy.getStatusVariable(MonitorAdminImpl.java:322)
|> at
org.apache.felix.sandbox.monitor.MonitorAdminImpl$MonitoringJobImpl$MyRunnable.run(MonitorAdminImpl.java:142)
|> at java.lang.Thread.run(Thread.java:595)
------------
The OSGi spec defines the following:
"Whether a monitoring job keeps track dynamically of the StatusVariables it
monitors is not specified. This means that if we monitor a StatusVariable of
a Monitorable service which disappears and later reappears then it is imple-
mentation specific whether we still receive updates of the StatusVariable
changes or not."
>From my point of view the MonitoringJob should just ignore disappeared
>variables and should continue to monitor all other variables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.