Hi,

 

When using iPojo 1.6.4 with annotations, the method you implement can
throw Java exceptions like following:

 

                @Validate

      public void validate() throws Exception

      {

        throw new Exception("My Exception");

      }

 

When executing this method, iPojo will first catch the Exception in the
"stateChanged(int)" method of the "LifecycleCallbackHandler" class.

This method will log an error and throw a new Exception that will
finally be caught by the "setState(int)" method of the "InstanceManager"
class.

This method will stop the current iPojo instance.

 

This mechanism is perfect, but is it possible to customize iPojo to be
able to do more in this use-case?

For example in our case: sending an Alert to someone indicating that the
start sequence of this Bundle failed...

This could be achieved by iPojo by sending a specific OSGi Event
indicating the cause of the error.

 

What do you think about this?

 

Thanks

Olivier

Reply via email to