myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3742) Implement @FlowDefinition annotation
Date Sun, 28 Jul 2013 21:27:48 GMT


Leonardo Uribe commented on MYFACES-3742:

Committed solution for this issue. It seems the easiest way to do it is use a cdi Extension
that register an application scope bean and use the annotation syntax to create the producer
method. Then, the tricky part was use cdi to get the list of flow definitions. I tried with
both weld and openwebbeans and in both cases it works.
> Implement @FlowDefinition annotation
> ------------------------------------
>                 Key: MYFACES-3742
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Sub-task
>          Components: JSR-344
>            Reporter: Leonardo Uribe
> Implement @FlowDefinition cdi annotation, as described in the spec.
> I have found this annotation very tricky to implement. It is simple to do it using @Produces
annotation, but the real trouble is we can't use CDI annotations inside myfaces implementation
by the following reasons:
> - jar files without beans.xml will not be scanned. If we add the file inside myfaces
jar, CDI will try to scan all classes inside the jar file, and some of them require optional
dependencies. The final effect is CDI will start to throw errors.
> - In some cases, myfaces jars are not on WEB-INF/lib folder, and are just part of the
default libraries of the server, so there is no reference to the files.
> The only option is use javax.enterprise.inject.spi.Producer, but Producer.getInjectionPoints()
returns a Set<InjectionPoint> which usually are customized for the CDI implementation.
So, we need to provide an implementation, but before that, we need to check how that part
works to do not break CDI implementations.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message