Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

At the moment, the integration of Apache CXF and CDI revolves around two key components:, residing in new module called cxf-integration-cdi

 - CXFCdiServlet servlet

 -  JAXRSCdiResourceExtension portable CDI extension JAXRSCdiResourceExtension portable CDI extension

The fact of including cxf-integration-cdi as a dependency allows  JAXRSCdiResourceExtension  portable CDI extension to be discovered by CDI container. The  JAXRSCdiResourceExtension creates the instance of the Bus and registers it with BeanManager. From this point, the  Bus instance is a regular CDI bean (with @Application scope) available for injection. This instance of the  Bus is being injected into CXFCdiServlet servlet once it is initialized by servlet container.

Depending on the design,  JAXRSCdiResourceExtension may use zero-based configuration approach or rely on particular JAX-RS application instances.

Zero-based Configuration