Hi Am 16.05.2013 um 09:34 schrieb Bertrand Delacretaz:
> Does anyone have an idea how we could provide feedback in the > webconsole when saving a configuration leads to errors? > > Creating two loggers with the same category, for example, is invalid, > but the only feedback is ERROR messages in the logs, from the > webconsole UI you don't see anything wrong. Yeah, because this is completely asynchronous: The Web Console writes the config through Config Admin and Config Admin asynchronously serves to the ManagedService[Factory] services. Nothing that the Web Console can do about. With other extenders like Declarative Services or Blueprint it is even more "disconnected" of some sort. > > AFAIK applying saved configs is asynchronous, so it's not trivial - > we'd need the thread that saves them to send events when exceptions > are thrown, or log interceptors...sounds a bit complicated but having > that feedback would be valuable. Yeah, but not trivial given the open-ended numbers of components involved: Configuration Admin for ManagedService[Factory] services, DS for components and more. And there is no feedback channel defined for failure of configuration deployment -- and except for ManagedService[Factory] it may not even be possible to easily trace back failure to the configuration. So this really leaves it to the components to convey this. For example the Sling Logging could, in addition to throing the ConfigurationException, take a note to be displayed in the Sling Logging's web console plugin. A generic solution is only possible with the cooperation of all partners taking configuration (remember there is more than one way that configuration may be not be consumed). Such cooperation is questionable. Regards Felix > > Thoughts? > > -Bertrand
