You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Raymond Auge <ra...@liferay.com> on 2020/06/14 00:58:18 UTC

Bootstrap classloader hierarchy and split packages

Hello Tomcat Devs,

Is it expected that when Bootstrap.init() invokes
"org.apache.catalina.startup.Catalina"'s constructor (which it finds in
catalina.jar) via reflection through catalinaLoader that some of the
classes in the package org.apache.catalina.startup, originating in
bootstrap.jar, are still used by classes loaded by the new classloader?

The result is that there are now two jars in runtime loaded by two separate
containers sharing classes from the same package.

I just want to make sure this is by choice and not accidental because this
is going to cause problems for both JPMS and OSGi and I need to figure out
how to deal with it. The first thing that might need to happen is that
bootstrap may need to export some of it's packages which will certainly
result in a split package scenario (since other modules already provide
those same packages). As you can guess in both module systems split
packages are a challenge.

Thx
-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)

Re: Bootstrap classloader hierarchy and split packages

Posted by Raymond Auge <ra...@liferay.com>.
Ok, I guess you can ignore this question because I think the conclusion is
that bootstrap cannot be used in JPMS at all.

I have figured out a boot process-ish and I can see things a little more
clearly now.

- Ray

On Sat, Jun 13, 2020 at 9:12 PM Raymond Auge <ra...@liferay.com>
wrote:

> Forgive me if this is a well worn topic.
>
> - Ray
>
> On Sat, Jun 13, 2020 at 8:58 PM Raymond Auge <ra...@liferay.com>
> wrote:
>
>> Hello Tomcat Devs,
>>
>> Is it expected that when Bootstrap.init() invokes
>> "org.apache.catalina.startup.Catalina"'s constructor (which it finds in
>> catalina.jar) via reflection through catalinaLoader that some of the
>> classes in the package org.apache.catalina.startup, originating in
>> bootstrap.jar, are still used by classes loaded by the new classloader?
>>
>> The result is that there are now two jars in runtime loaded by two
>> separate containers sharing classes from the same package.
>>
>> I just want to make sure this is by choice and not accidental because
>> this is going to cause problems for both JPMS and OSGi and I need to figure
>> out how to deal with it. The first thing that might need to happen is that
>> bootstrap may need to export some of it's packages which will certainly
>> result in a split package scenario (since other modules already provide
>> those same packages). As you can guess in both module systems split
>> packages are a challenge.
>>
>> Thx
>> --
>> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>>  (@rotty3000)
>> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>>  (@Liferay)
>>
>
>
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>  (@Liferay)
>


-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)

Re: Bootstrap classloader hierarchy and split packages

Posted by Raymond Auge <ra...@liferay.com>.
Forgive me if this is a well worn topic.

- Ray

On Sat, Jun 13, 2020 at 8:58 PM Raymond Auge <ra...@liferay.com>
wrote:

> Hello Tomcat Devs,
>
> Is it expected that when Bootstrap.init() invokes
> "org.apache.catalina.startup.Catalina"'s constructor (which it finds in
> catalina.jar) via reflection through catalinaLoader that some of the
> classes in the package org.apache.catalina.startup, originating in
> bootstrap.jar, are still used by classes loaded by the new classloader?
>
> The result is that there are now two jars in runtime loaded by two
> separate containers sharing classes from the same package.
>
> I just want to make sure this is by choice and not accidental because this
> is going to cause problems for both JPMS and OSGi and I need to figure out
> how to deal with it. The first thing that might need to happen is that
> bootstrap may need to export some of it's packages which will certainly
> result in a split package scenario (since other modules already provide
> those same packages). As you can guess in both module systems split
> packages are a challenge.
>
> Thx
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>  (@Liferay)
>


-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)