Sahoo wrote:
Richard S. Hall wrote:
Sahoo wrote:
In "private void _startBundle(FelixBundle bundle, boolean record)" method in Felix.java, I see that a bundle's persistent state is changed to ACTIVE before the bundle is actually activated. Is this not likely to cause problems when there is any exception during actual activation of the bundle?

What kind of problem do you anticipate?
Since the code first sets the persistent state to ACTIVE and then does a lot of work including invoking the activator, there is a good chance of some exception happening after the state is changed but before start() returns. In such a case, the code does not reset the persistent state. Is this OK?

I don't think the code ever resets the persistent state. To do that, you must call Bundle.stop(). An exception does not reset the persistent state, it only impacts the run-time state, which is set back to RESOLVED.

-> richard

Thanks,
Sahoo

Reply via email to