You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by shantanu <sh...@yahoo.com> on 2013/11/11 14:15:01 UTC

OSGI : org/osgi/framework/ServiceEvent/MODIFIED not getting fired

I have an OSGI (Felix) application deployed on TomCat in which there are few
services created using declarative services. e.g.

@Service
@Component(metatype = true)
public class SomeService implements IInterface {
@Property(value = "1")
private static final String SOME_PROP = "SOME_PROP";

@Modified
public void modified(Map<String, ?> inConfig)
{ //some code
}

@Activate
public void activate(Map<String, ?> inConfig)
{ //some code
}

Now after I start the framework I can see that the bundle corresponding to
this service has been started. Properties for this bundle are loaded through
felix file install. I can see in the Configuration page that a config entry
is there for this service but its not bounded to the bundle. As a result if
I try to change the property (SOME_PROP) through OSGI
console/Configurations, I only see an event with event topic
org/apache/felix/webconsole/plugins/event/internal/converter/ConfigurationEventConverter/CM_UPDATED
getting fired. I do not see org/osgi/framework/ServiceEvent/MODIFIED getting
fired and hence modified method is not called and I can not see the new
property value in bundle. Also one weird thing that I notice is that even
though bundle felix.scr is listed in the installed bundles list, I can not
see Bundle org.apache.felix.scr started event corresponding to it.
Also one strange observation is that if I remove some bundles (random) from
the application dependencies and then restart the application on TomCat
everything works fine.

Any hints on this ?



--
View this message in context: http://apache-felix.18485.x6.nabble.com/OSGI-org-osgi-framework-ServiceEvent-MODIFIED-not-getting-fired-tp5006008.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org