Search code examples
javaosgicdijboss-weldpax

What is the difference between weld-osgi, pax-cdi and fighterfish


As I understand these 3 projects are links between CDI and OSGI but what is difference between them?


Solution

  • FighterFish lets you inject OSGi services into CDI beans, but it does not let you publish CDI beans as OSGi services.

    Weld OSGi is a (now obsolete) extension of Weld for OSGi which requires a modified version of Weld 1.x. (1.2.0.Beta1)

    Weld 2.1 and higher include some modifications originating from Weld OSGi which make the Weld core more OSGi-friendly by supporting multiple CDI containers in parallel, independent of the thread-context class loader.

    The Weld Reference manual now recommends using Pax CDI in OSGi environments.

    Pax CDI supports injection and registration of OSGi services. It is not tied to any given CDI implementation (unlike Weld OSGi) and currently supports Weld 2.2.x and OpenWebBeans 1.5.0.

    Conceptually, Pax CDI is more or less a superset of both FighterFish CDI and Weld OSGi, i.e. for most FighterFish and Weld OSGi features, you'll find equivalent solutions in Pax CDI.

    At some time, Pax CDI was planned to be the official reference implementation of the CDI Service specified by the OSGi Enterprise Expert Group. Since this specification effort is currently stalled (for all we know), this is no longer the case, and the Pax CDI project is now following its own roadmap.

    Disclaimer: I'm the Pax CDI project lead.