You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Mikael <mi...@telia.com> on 2020/02/01 11:49:46 UTC

Class loader

Hi!

Will the Ignite class loader find classes/jar files added to the lib 
directory after it is started, or do all classes/jar files have to be 
there at startup (running Ignite from ignite.sh) ?

It looks like it will not find any classes added after startup as far as 
I can tell after a quick test, but maybe there is a way around that ?

Why ? well, the idea was to be able to replace services without any 
restart, the service is wrapper class that load the actual services, and 
it do that by searching for a specific class name with a version number 
included in the name, so by adding a new class with a different name it 
would be possible to load the new updated class without having to 
restart Ignite, don't even need to restart the service itself.

But for that to work the class loader must of course be able to find the 
new added class file or jar.

Mikael



Re: Class loader

Posted by Mikael <mi...@telia.com>.
Hi!

Yes, that should do the trick, I will have a look at it.

Thanks.


Den 2020-02-03 kl. 12:05, skrev Ilya Kasnacheev:
> Hello!
>
> We have a thing calles URI deployment:
>
> https://apacheignite.readme.io/docs/deployment-spi
>
> It allows you to specify location to be scanned at regular intervals, 
> if there are any new JARs they will be reloaded, with versioning support.
>
> Sounds like the exact thing that you are describing.
>
> Regards,
> -- 
> Ilya Kasnacheev
>
>
> сб, 1 февр. 2020 г. в 14:49, Mikael <mikael-aronsson@telia.com 
> <ma...@telia.com>>:
>
>     Hi!
>
>     Will the Ignite class loader find classes/jar files added to the lib
>     directory after it is started, or do all classes/jar files have to be
>     there at startup (running Ignite from ignite.sh) ?
>
>     It looks like it will not find any classes added after startup as
>     far as
>     I can tell after a quick test, but maybe there is a way around that ?
>
>     Why ? well, the idea was to be able to replace services without any
>     restart, the service is wrapper class that load the actual
>     services, and
>     it do that by searching for a specific class name with a version
>     number
>     included in the name, so by adding a new class with a different
>     name it
>     would be possible to load the new updated class without having to
>     restart Ignite, don't even need to restart the service itself.
>
>     But for that to work the class loader must of course be able to
>     find the
>     new added class file or jar.
>
>     Mikael
>
>

Re: Class loader

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

We have a thing calles URI deployment:

https://apacheignite.readme.io/docs/deployment-spi

It allows you to specify location to be scanned at regular intervals, if
there are any new JARs they will be reloaded, with versioning support.

Sounds like the exact thing that you are describing.

Regards,
-- 
Ilya Kasnacheev


сб, 1 февр. 2020 г. в 14:49, Mikael <mi...@telia.com>:

> Hi!
>
> Will the Ignite class loader find classes/jar files added to the lib
> directory after it is started, or do all classes/jar files have to be
> there at startup (running Ignite from ignite.sh) ?
>
> It looks like it will not find any classes added after startup as far as
> I can tell after a quick test, but maybe there is a way around that ?
>
> Why ? well, the idea was to be able to replace services without any
> restart, the service is wrapper class that load the actual services, and
> it do that by searching for a specific class name with a version number
> included in the name, so by adding a new class with a different name it
> would be possible to load the new updated class without having to
> restart Ignite, don't even need to restart the service itself.
>
> But for that to work the class loader must of course be able to find the
> new added class file or jar.
>
> Mikael
>
>
>