[ 
https://issues.apache.org/jira/browse/MYFACES-2919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909446#action_12909446
 ] 

Jakob Korherr commented on MYFACES-2919:
----------------------------------------

Hi Leo,

1. It was changed to catch Throwable to allow swallowing Errors too, in order 
to prevent Errors in one LifecycleProvider affect any other LifecycleProvider.
2. It will work just as before (already tested), because the "old" 
TomcatAnnotationLifecycleProvider will be picked up and will return true in 
isAvailable(), and the new Tomcat7AnnotationLifecycleProvider will be picked up 
too, but return false in isAvailable(), because it is not a Tomcat-7 
environment, and thus will not be installed.
3. This coded was commented in the first place, because we were not sure 
whether or not to include annotations from super-classes, but Gurkan is right, 
the spec states that we should also scan super-classes. Thus the code was 
uncommented.

I tested some scenarios and it all worked well. However if you think it is too 
unstable to include it in the release, please feel free to revert the code ;)

Regards,
Jakob

> LifecycleProvider Based Problems and Tomcat7 LifeCycleProvider Support
> ----------------------------------------------------------------------
>
>                 Key: MYFACES-2919
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2919
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Gurkan Erdogdu
>            Assignee: Jakob Korherr
>             Fix For: 2.0.2-SNAPSHOT
>
>         Attachments: MYFACES-2919-2.patch, patch.txt
>
>
> Patch content
> ----------------------
> 1- ResourceAnnotationLifecycleProvider : It does not check super class for 
> annotations. It must examine super classes. This is specificed in Java EE 6 
> specification, EE 5.2.5 Annotations and Injections.
> 2- TomcatAnnotationLifecycleProvider : isAvailable Method must catch 
> "Throwable" and ignore them. Otherwise, it throws error/s that are not 
> catched and calling code is not able to process other lifecycle providers.
> 3- StartupServletContextListener : Early initiliazation of lifecycle 
> provider. Otherwise, it is not possible to use META-INF/services providers.
> 4- pom.xml : Adding Tomcat 7 libs.
> 5- Tomcat7AnnotationLifecycleProvider : Tomcat 7 based LifeCycleProvider 
> implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to