You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ivan (JIRA)" <de...@myfaces.apache.org> on 2010/11/18 03:09:14 UTC

[jira] Issue Comment Edited: (MYFACES-2945) Make a way to get the FacesConfig from a provider

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

Ivan edited comment on MYFACES-2945 at 11/17/10 9:07 PM:
---------------------------------------------------------

First, I have to admit I am not familar with the whole MyFaces arch, just my two cents :-)
1. Yes, commons-discovery should not work correctly in OSGI, while Geronimo provides a BundleClassloader, it will help to search all the bundles wired to the application, and it should be why it works now. But, for those SPI, I do not like to find them by commons-discovery or any other search strategy, as those configurations should be provided by the Geronimo (e.g. Geronimo needs to know those annotated managed bean classes, and create jndi context for them if required), and on the runtime, no one knows what resource could be find anywhere, currently, I used an 'urgly' way to directly configure them in the cache of commons-discovery, and I hope that there is better way to configure it.
2. I would prefer the option 2. 
To cache all the configurations from server runtime and application is a bit overcharged. I think that it is only required to cache the final result when the application is deployed, if the dependency of the application is changed, it needs to re-deploy the application, as many things might be changed, not only for JSF. I feel that the interface mentioned by you or other members on the mail list is OK, a method like FacesConfig getApplicationFacesConfig() should be enough.
Also, how about creating a builder class ? And, move those sort algorithm there from the FacesConfiguator, and for FacesConfigurator, it directly call the getFacesConfig method to get the final result and configure the final Facotory to the JSF runtime.
Thanks.

      was (Author: xuhaihong):
    First, I have to admit I am not familar with the whole MyFaces arch, just my two cents :-)
1. Yes, commons-discovery should not work correctly in OSGI, while Geronimo provides a BundleClassloader, it will help to search all the bundles wired to the application, and it should be why it works now. But, for those SPI, I do not like to find them by commons-discovery or any other search strategy, as those configurations should be provided by the Geronimo (e.g. Geronimo needs to know whi), and on the runtime, no one knows what resource could be find anywhere, currently, I used an 'urgly' way to directly configure them in the cache of commons-discovery, and I hope that there is better way to configure it.
2. I would prefer the option 2. 
To cache all the configurations from server runtime and application is a bit overcharged. I think that it is only required to cache the final result when the application is deployed, if the dependency of the application is changed, it needs to re-deploy the application, as many things might be changed, not only for JSF. I feel that the interface mentioned by you or other members on the mail list is OK, a method like FacesConfig getApplicationFacesConfig() should be enough.
Also, how about creating a builder class ? And, move those sort algorithm there from the FacesConfiguator, and for FacesConfigurator, it directly call the getFacesConfig method to get the final result and configure the final Facotory to the JSF runtime.
Thanks.
  
> Make a way to get the FacesConfig from a provider
> -------------------------------------------------
>
>                 Key: MYFACES-2945
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2945
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 2.0.2
>            Reporter: Ivan
>            Assignee: Leonardo Uribe
>
> Currently, MyFaces startup listener will parse the all the faces configuration files and sort them on each startup time, and it will be better to do it once in the deployment time, and get those data structure instances from a provider. One possible way is to make those FacesConfig class serializable.

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