[
https://issues.apache.org/jira/browse/MYFACES-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933392#action_12933392
]
Jakob Korherr commented on MYFACES-2945:
----------------------------------------
Thanks for all this information, Leo :)
For the commons-discovery problem I would suggest to "copy" the code from
ServiceLoader from the Java 6 Runtime [1]. As I've seen so far, many other open
source projects that run on Java 5 did the same (e.g. Arquillian), thus it
seems to be a common technique at the moment. In this way we could get rid of
commons-discovery once and for all, because in future versions of JSF which run
only on Java 6, we can just replace our copied version of ServiceLoader with
the version from Java 6.
Furthermore we could create a MyFacesServiceLoader which uses this
ServiceLoader class, but also has a way to add Service entries
programmatically. Thus Geronimo would be able to add its Service
implementations to that class before MyFaces starts and it will be guaranteed
that those Service impls will be used.
Ivan, it is not clear to me which option you prefer. You wrote "I would prefer
the option 2", but in the text afterwards you explain why option 1 (Cache the
final information of all previous process) is better. So what do you actually
prefer for Geronimo?
IMO option 1 is the way to go, because it's easier and moreover, on option 2
there are a lot of things which can (and will) go wrong, because it could be
really complex if you think of the whole Java EE enviroment.
For the OSGi related problems, please take a look at MYFACES-2976. IMHO a
separate MyFaces OSGI bundle is the way to go (actually, Mojarra does exactly
the same). Of course, this OSGi bundle will be created automatically by maven
out of the myfaces-api and myfaces-impl artifacts and there is no need
duplicate code.
[1] http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html
> 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.