[
https://issues.apache.org/jira/browse/FELIX-3151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13124175#comment-13124175
]
Richard S. Hall commented on FELIX-3151:
----------------------------------------
There is no particular reason. It could be done, but it would potentially
complicate concurrency issues even more since we'd have to block the calling
thread, call into the bundle with another thread, who could then in turn call
back into the framework on another thread, which means we'd have to be extra
careful with locking. This is really complicated by things like "refresh" that
have to hold locks and operate on multiple bundles.
Further, the implied solution here is to have a timeout and try to kill the
activator thread if it is taking too long, but we already know that killing
threads in Java is unreliable and not recommended. Further still, this is just
one failure mode associated with bundles and there are tons of other failure
modes that we can't do anything about, since Java doesn't provide any way to
isolate or limit resource consumption. So, in the end, if a bundle is not well
behaved, it is probably better to learn about it quicker and stop using it.
> Activating bundles in seperate thread
> -------------------------------------
>
> Key: FELIX-3151
> URL: https://issues.apache.org/jira/browse/FELIX-3151
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: Andie Similon
> Priority: Minor
>
> I was wondering about the following thing and I'd like one of the developers
> opinion about it. Is there a reason why bundles are not started in a seperate
> thread. I was wondering this because if a bundle developer creates a bundle
> that ends up in an infinite loop or something in the bundle start method, it
> will block the entire system. Is there a reason why the bundles aren't
> started in a seperate thread?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira