Hi all,

Nuxeo runtime packaging was refactored to better split functionalities and logic.
Also build.xml were modified:
- a new clean-all target was added in Nuxeo/build.xml
- clean targets are no more called before building projects
- If you want to clean build temp files you need to do a manual clean

How NXRuntime was refactored:
the old projects: NXRuntime and NXJBossRuntime were split in 5 projects:

NXRuntime - the nuxeo runtime (component model) packaged as an osgi bundle
OSGiAdapter - a minimal implementation of an OSGi framework (an OSGi subset) - used to adapt non osgi platform to an osgi compatible environment NXJBossExtensions - nuxeo jboss extensions featuring a custom deplyoment sorter, EAR deployer and OSGi adapter NXJBossRuntime - adapt nuxeo runtime components to JBoss entities (like MBean services or datasources)
NXCommon - contains utility code + XMap engine

*Note:* After updating from svn you need to remove any old deployment files to be able to deploy Nuxeo5.

----------------------------------


How the nuxeo runtime is loaded on an OSGi host platform (like Eclipse)

1. the host platform (osgi) is started
2. the NXRuntime.jar bundle is started before any other nuxeo runtime dependent bundle 3. When started the NXRuntime .jar bundle register an OSGi listener to be able top load nuxeo components when new bundles are registered (If some nuxeo bundles was already registered these are scanned and if any nuxeo component found is loaded)
4. Bundles containing nuxeo components are started
(NXRuntime bundle is loading notified and loads any declared component)

So in the case of an OSGi platform the NXRuntime is a simple OSGi bundle. The only requirement is to *start* it before any other bundle declaring nuxeo components. Note: On some versions of Eclipse it is not enough to register the runtime bundle first (via dependencies) - but you need to start it first! Starting a bundle means to call the BundleActivator.start() method for that bundle. This can be done in eclipse by modifying the configuration/config.ini file and adding the nxruntime bundle in the osgi.bundles list.


How the nuxeo runtime bundle is started on JBoss:

1. JBoss starts
2. The following jars are loaded from jboss static lib directory (e.g. ${jboss}/server/default/lib)
   - nuxeo-common.jar
   - nuxeo-osgi.jar
   - nuxeo-jboss-extensions.jar
3. The nuxeo deployment sorter is loaded (from config/jboss-service.xml)
4. Nuxeo EAR deployer and OSGi deployer adapter are loaded
4. The NXRuntime.jar bundle is deployed by JBoss before any other nuxeo bundle (thanks to the custom deployment sorter) and the OSGi adapter is starting the NXRuntime OSGi bundle 5. When started the NXRuntime.jar bundle register an OSGi listener to be able to load nuxeo components when new bundles are registered 6. NXJBossRuntime.sar is deployed. It is registering JBoss adapters for Nuxeo components - as runtime component listeners
(like for example to adapt a nuxeo component to a mbean)
7. Other JBoss modules are deployed and the OSGi adapter is starting any suitable OSGi it founds => NXRuntime is notified and load any declared component



Bogdan




_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to