java - Force OSGi service be reloaded -
assume have 2 osgi services. 1 of them memory cache of db records. service set of crud operations on these db records. during modification rebuild existing cache. how 1 service can force modified? send org.osgi.framework.serviceevent.modified event.
(please note simplified example of real business case , don't place cache service)
update make question more clear - need same function serviceregistration#setproperties provides. unfortunately serviceregistration should not leave bound of bundle.
why want solve using services?
simply send event using eventadmin crud bundle says data modified. cache can listen these events , act accordingly. advantage of eventing solution crud service not have know there cache sends event whoever interested.
Comments
Post a Comment