Hi all,

I have a bundle which is activated through Declarative Services and when I
perform a bundle.start(), the component defining the activate(...) method
raised an exception, but I can only see following in the logs:

Declarative Services got exception when invoking "activate" in component
myeventlistener.eventlistener-1.0.0
(java.lang.reflect.InvocationTargetException)

What I want is the code doing bundle.start() to be notified of such failure,
so can stop the process.From the specs:

"If the activate method throws an exception, SCR must log an error message
containing the exception with the Log Service, if present, and the component
configuration is not activated."

I know I could use a BundleActivator approach instead, but I wouldn't want
to lose other benefits DS offers to me. Is anyone aware of some pattern I
could use to accomplish this?

Thanks in advance.

Reply via email to