FAQ

How does Pax CDI relate to the OSGi Enterprise Specification?

The OSGi Enterprise Specification Release 5 does not yet contain a CDI service. At the moment, there is only a draft specification (RFC-193) for an OSGi CDI Integration.

Like all other Pax projects, Pax CDI is a community work of individual OSGi enthusiasts, with no organizational relations whatsoever to the OSGi Alliance.

Pax CDI will monitor the progress of the OSGi CDI specification effort and provide input whereever possible.

The is an eeg-ri branch in the Pax CDI created by OSGi Alliance members which will eventually converge with the OSGi CDI reference implementation. This branch will be merged into Pax CDI master not before 0.6.0.

Is Pax CDI an independent implementation of the CDI standard (JSR-299 )?

No. Pax CDI just provides the glue code for integrating existing CDI implementations with OSGi.

Apache DeltaSpike provides generic wrappers for launching stand-alone CDI containers. Why does Pax CDI do the same thing again?

Pax CDI does a similar but different thing. DeltaSpike launchers work in Java SE environments, whereas Pax CDI addresses OSGi environments, where class loading and module dynamics require special attention.

Most DeltaSpike artifacts are not even OSGi-enabled at the moment (see DELTASPIKE-210).

Does Pax CDI support Apache OpenWebBeans?

Yes. OpenWebBeans 1.1.6 is the reference CDI provider for Pax CDI.

Does Pax CDI support JBoss Weld?

Yes, as of Pax CDI 0.3.0 and Weld 1.2.0.Beta1. Weld 1.x does not offer suitable APIs to create an independent CDI container for each OSGi bundle. See http://permalink.gmane.org/gmane.comp.java.ops4j.general/13897.

Weld 2.1.0 is supported as of Pax CDI 0.5.0.

Does Pax CDI support Resin CanDI?

No. OPS4J projects are released under the Apache Software License v2, whereas Resin is released under the GNU Public License v2. These two licenses are not compatible.

Does Pax CDI support CDI 1.0 or CDI 1.1?

CDI 1.0. New CDI 1.1 features may or may not work when using Pax CDI with Weld 2.1. OpenWebBeans does not currently support CDI 1.1.

Does Pax CDI support web applications?

Yes, as of Pax CDI 0.3.0, by means of additional web adapters in combination with Pax Web 3.0.0.M1. Not all web features have been tested yet, but the most fundamental functionality (session and request scopes, injection into servlets) is available.

Does Pax CDI require a web container?

No. If you do not require web support, then just don't use any of the pax-cdi-web* bundles. pax-cdi-web depends on Pax Web and on the Servlet API. The Pax CDI core modules do not depend on any web APIs.

Does Pax CDI create a global CDI container, or one container per bundle?

Each bean bundle has its own CDI container. This is already implicit in RFP 146:

CDI023 – All the inter-bundle interaction between CDI beans MUST go through the OSGi Service Registry.

Which OSGi Core specification version is required by Pax CDI?

Pax CDI requires OSGi Core 4.3 or higher, relying on capabilities and weaving hooks.

Which OSGi implementations are supported by Pax CDI?

Any compliant implementation of OSGi Core 4.3 should work. The automatic integration test suite currently uses Equinox 3.7.0.