Re[2]: war/WEB-INF/lib in JPMS concept

Alex Sviridov ooo_saturn7 at mail.ru
Fri Sep 28 16:59:18 UTC 2018


Do I understand you right - you suggest to take these jars from /lib and deploy
them on the same layer (where is .war module) as independent modules. 
And when we create this layer we create one class loader for all modules?

Best regards, Alex


>Пятница, 28 сентября 2018, 19:45 +03:00 от Alan Bateman <Alan.Bateman at oracle.com>:
>
>On 28/09/2018 17:06, Alex Sviridov wrote:
>> If we place .war file on JPMS layer and this .war file has .jars in WEB-INF/lib what we should
>> do with these jars? Should we deploy them at the the same JPMS layer with .war module?
>> I mean :
>> JPMS layer:
>> - war module
>> - jarmodule1_from_war
>> - jarmodule2_from_war
>> ...
>> - jarmoduleN_from_war?
>>
>> Or should we create for them another layer? Or something else?
>This may need someone familiar with servlet or other Java EE specs to 
>comment. I think, but not certain, that there is something in the 
>servlet spec about the classes in these JAR files needing to be visible 
>to the web application class loader. I think it may have something to 
>imply that the classes in the web application and the classes loaded 
>from lib/* are defined to the same class loader. In any case, if there 
>are no overlapping packages then you should be able to map all of the 
>modules to the same class loader (defineModuelsWithOneLoader) and it 
>should work.
>
>-Alan.


-- 
Alex Sviridov


More information about the jigsaw-dev mailing list