You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stephane Passignat <pa...@hotmail.com> on 2018/12/08 15:18:10 UTC

Sci and web fragment initialization

Hello,

I've seen this non compliancy. In TC 7.042 and 7.0.72. How, who can fix this ?

The case is related to web-fragment loading and SCI initialization.
In Tomcat 7.0.42 and 7.0.72 at least, SCI (with @HandlesTypes annotation) are initialized web-fragments per web-fragments, with the classes previously discovered (in the WEB-INF/classes and previous processed jars). This means @HandlesTypes classes implementation located in web-fragments loaded after the one having the SCI are not provided to the SCI:onStartup method.
The specification (8.2.4: onStartup method get's a Set of Classes) here is not clear, but we would expect having all classes, not only an "undefined" set of classes.
A possible solution is a three steps initialization:
- discover all SCI classes and their @HandlesTypes in all web-fragments
- discover all @HandlesTypes implementation classes in all web-fragments
- initialize SCI

Thanks
Stephane

Re: Sci and web fragment initialization

Posted by Mark Thomas <ma...@apache.org>.
Please don't hijack threads. Please start a new thread for a new topic.

Mark


On 08/12/2018 15:18, Stephane Passignat wrote:
> 
> Hello,
> 
> I've seen this non compliancy. In TC 7.042 and 7.0.72. How, who can fix this ?
> 
> The case is related to web-fragment loading and SCI initialization.
> In Tomcat 7.0.42 and 7.0.72 at least, SCI (with @HandlesTypes annotation) are initialized web-fragments per web-fragments, with the classes previously discovered (in the WEB-INF/classes and previous processed jars). This means @HandlesTypes classes implementation located in web-fragments loaded after the one having the SCI are not provided to the SCI:onStartup method.
> The specification (8.2.4: onStartup method get's a Set of Classes) here is not clear, but we would expect having all classes, not only an "undefined" set of classes.
> A possible solution is a three steps initialization:
> - discover all SCI classes and their @HandlesTypes in all web-fragments
> - discover all @HandlesTypes implementation classes in all web-fragments
> - initialize SCI
> 
> Thanks
> Stephane
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org