Align to OSGi life cycle specifications
---------------------------------------
Key: NXP-6035
URL: https://jira.nuxeo.org/browse/NXP-6035
Project: Nuxeo Enterprise Platform
Issue Type: Improvement
Affects Versions: 5.4
Reporter: Bogdan Stefanescu
Assignee: Bogdan Stefanescu
Priority: Major
There are 2 major issues in runtime - that are not OSGi compatible:
1. the FRAMEWORK_STARTED event is incorrectly used:
- we cannot rely on this event to be sure that all nuxeo components are
activated - since this event means that the OSGi framework started and not the
application. For example in equinox this event is sent even before activating
the Nuxeo runtime.
To solve this the runtime will send a specific runtime event.
Then I will rewrite the bootstrap code to avoid relying on FRAMEWORK_STARTED.
(this is not urgent for now but will be to be able to start in felix)
2. Runtime components are activated in the RESOLVE life cycle phase - which is
good. But in that phase the BundleContext is not available on true OSGi
frameworks. This object is available only after the bundle was started - this
means in the BundleActivator.
Some Nuxeo components are accessing this object in the activate() method which
is illegal since on most OSGi frameworks it will throws a NPE. (this is not the
case in Equinox - this is why it is working in Apogee - but the specs are
clearly saying this). In felix we have a NPE which is normal.
To solve this I will refactor all components which are accessing the
BundleContext in activate().
This is a first step to be ready to run in any OSGi framework (like felix)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets