-
Bug
-
Resolution: Unresolved
-
Major
-
3.0.5.Final
-
None
(See this forum message for details.)
I have a CDI SE application (flat classpath). I have a JpaInjectionServices implementation with a corresponding META-INF/services entry.
I notice that it is instantiated three times by Weld, but only the first instance is used.
I believe this is because the code in AdditionalServiceLoader loads the service using three distinct ResourceLoaders: the single ClasspathResourceLoader used by the Deployment, the WeldClasspathResourceLoader used always when loading additional services, and the DefaultResourceLoader used always when loading additional services.
At the very least it seems that there should be some documentation that indicates that a Service will be instantiated in a CDI SE application a minimum of three times, and only the first of those three instances will be used.