I don't think this is easily achievable with DS. However, if you are not tied to DS, but just want similar functionality, then you might be able to get it from iPOJO. I do know that iPOJO has a reflection mechanism so you can inspect the state of all dependencies of component instances, for example.

-> richard

Rubén Barroso wrote:
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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to