To me, this sounds like a great way to implement Grails-style plugin
support. I haven't worked with Grails closely enough to know for sure,
however. Thoughts?
---
Kito D. Mann -- Author, JavaServer Faces in Action
http://twitter.com/kito99  http://twitter.com/jsfcentral
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
+1 203-404-4848 x3


On Fri, May 29, 2009 at 11:05 AM, Bernhard Huemer <bernhard.hue...@gmail.com
> wrote:

> Hello,
>
> recently I've thought of using JSF in an OSGi environment because of the
> greater modularity it would provide for developers. JSF already provides
> reusability regarding the user interface, i.e. JSF provides the possibility
> to create user interface components, but what do you do if you want to reuse
> more aspects of previous applications than just user interface fragements?
> How to reuse dialogs, i.e. certain workflows, etc..?
>
> OSGi already does provide these reusability features and hence I've adapted
> MyFaces in a way so that it's runnable in an OSGi container. Basically you
> just have to deploy an implementation of the OSGi HTTP Service (e.g. Pax Web
> [1]), the two MyFaces bundles (myfaces-api and myfaces-impl) and your web
> application bundles. Basically a BundleListener keeps track of all bundles
> being deployed to the OSGi container, so if the user installs a JSF bundle
> MyFaces gets notified and merges the current configuration with the
> configuration of the new bundle.
>
> However, even though I've been able to implement a running version, I had
> to change major parts of MyFaces. For example, using OSGi you can't use the
> context class loader if you want to create a new instance for a class that
> resides in a different bundle (think of managed beans, MyFaces is
> responsible for creating the instance, but the class file is located in a
> different bundle) and hence I had to rewrite the configuration module (e.g.
> a LifecycleProvider implementation receives just a class name of the managed
> bean to instantiate assuming that it can load the class using the context
> class loader, but that won't work in the case of an OSGi environment).
>
> Therefore I'd like to know if I should start contributing these changes?
> (and if so, should I create a different branch at first, etc.?)
>
> regards,
> Bernhard
>
> [1]: http://wiki.ops4j.org/display/paxweb/Pax+Web
>

Reply via email to