I, for one, am all for having it in.  It's not like it will break anything
and if it gives a performance boost, all the better.

Max, we may want to generate a bug against the spec to see if they can fix
that.  Is that possible?

On Mar 24, 2011, at 3:49 PM, Max Starets <[email protected]> wrote:

Leonardo,

The check in Mojarra is done in
com.sun.faces.config.ConfigManager.getAnnotationScanURLs().

Andy can probably dig out EG e-mails where this was agreed.

Thanks,
Max

On 3/24/2011 5:35 PM, Max Starets wrote:

Leonardo,

I have tested metadata-complete with Mojarra, and it is not ignored. I can
point you to the Mojarra code that does the check.
>From what I understand, this feature was included a while ago (during the
initial 2.0 release) after Andy Schwartz lobbied for it. It looks like the
spec was not properly updated,

I still would like to proceed with the plugin change since we can take
advantage of skipping annotation scanning at least with Mojarra.

Max

On 3/24/2011 5:13 PM, Leonardo Uribe wrote:

Hi

2011/3/24 Max Starets <[email protected]> <[email protected]>:


 Hey Leonrado,

The change is to allow the plugin to generate metadata-complete=true for
trinidad-impl's faces-config.xml.
See https://issues.apache.org/jira/browse/TRINIDAD-2068


The problem here is this config will be ignored by myfaces core,
because we don't have any code that check for it before scan for
annotations. In practice, trinidad jars are scanned for JSF 2.0
annotations, no matter if myfaces or mojarra are used. I understand
the intention, but to complete it, it is necessary to commit some
changes on myfaces core 2.0.x (and mojarra). I checked it some days
ago and the documentation is not clear:

"...The metadata-complete attribute defines whether this
JavaServer Faces application is complete, or whether
the class files available to this module and packaged with
this application should be examined for annotations
that specify configuration information...."

"... This attribute is only inspected on the application
configuration resource file located at "WEB-INF/faces-config.xml".
The presence of this attribute on any application configuration
resource other than the one located at "WEB-INF/faces-config.xml",
including any files named using the javax.faces.CONFIG_FILES
attribute, must be ignored. ..."

regards,

Leonardo



 Max


On 3/24/2011 3:50 PM, Leonardo Uribe wrote:


 Hi

As a side note:

SO >> There were some minor fixes and the plugins now mark the trinidad
package
SO >> as being "metadata complete" in order to help avoid having to
scan the jar for
SO >> class annotations at runtime.

Reading JSF 2.0 spec, metadata-complete is only used on
WEB-INF/faces-config.xml. Is it a change for 2.1? or maybe there is
something missing on the spec?

regards,

Leonardo Uribe

2011/3/24 Andy Schwartz <[email protected]> <[email protected]>:



 +1.  Thanks for putting this together Scott!

Andy

Reply via email to