[weld-dev] Remove JSF from Weld Core?

ssilvert at redhat.com ssilvert at redhat.com
Mon May 20 12:32:55 EDT 2013


Hi Guys,

I'd like to get your thoughts on the possibility of removing JSF
dependencies from Weld Core and putting them in their own artifact.  The
reason I want to do this is so that in WildFly we can more easily allow
Weld JSF classes to work with multiple JSF versions.

As it is now, Weld Core has a hard-coded dependency on the single JSF
version that ships with WildFly.   So whether someone uses the Multi-JSF
feature or uses WAR_BUNDLES_JSF_IMPL, you can get Linkage errors when
trying to use Weld Core.

>From what I see, the JSF classes in Weld Core aren't really used by the
rest of Weld Core.  Instead they are instantiated via the Weld
subsystem's inclusion of the ConversationAwareViewHandler in its
faces-config.xml.

The only part of Weld Core that "sort of" uses a JSF dependency is
BeanDeployment.  This instantiates an instance of JsfApiAbstraction and
registers it the Weld ServiceRegistry.  JsfApiAbstraction is only there
to determine the JSF spec version.  But I haven't been able to find
anywhere it is actually used in the wild.

Specifically, I would like to move the org.jboss.weld.jsf package into
its own jar artifact. 
org.jboss.weld.servlet.ConversationPropagationFilter would go in there
too.   Weld Core would then list the new artifact as a dependency so as
not to break backward compatibility.

If you think it's a good idea I'll be glad to do the work to make it
happen.  Please let me know.

Thanks,

Stan


More information about the weld-dev mailing list