tags:

views:

656

answers:

1

Has anyone used OSGi and JSF together?

I ask because JSF uses class-loader magic to find custom components. From a tutorial (emphasis mine):

This configuration file will end up being META-INF/faces-config.xml in the .jar file that represents this component. JSF will look for such a file name in each of the .jar files that are loaded at runtime (in the WEB-INF/lib directory for .war files) and use each of them in its configuration. In this way, multiple component .jar files can be combined into one web application, and all of the components described in each .jar will be available to the application.

I would like to be able to have JSF custom components as OSGi bundles (i.e. custom components are in different OSGi bundles than the JSF runtime) and for JSF to be able to find these at runtime.

Has anyone done anything similar?

+1  A: 

I am not sure it does exactly answer your problem, but I found this thread about Spring and osgi interresting, especially this specific answer where dependencies and classpath are bundled in the MANIFEST.MF.

That thread also leads to the update of this for tutorial about Spring Dynamic Modules (DM) for OSGi™ Service Platforms which may also be of interest.

VonC