I want to make a change to our zone extension for our Smartfox server that adds a couple additional external libraries.
I wanted to check if it is possible to hotswap the extension with adding the new libraries to the /lib/ folder and replacing the extension jar then reloading, or if this always requires a server restart? We have had issues with this in the past trying to avoid the hard restart on our users.
If it always requires a server restart then what are the downsides of building the external jar's into our extension jar to avoid this?
Thanks for the help!
Is it possible to hotswap external libraries?
Re: Is it possible to hotswap external libraries?
Hi,
no it's not possible, because the dependencies in the main classpath are loaded once, at server startup.
If the Extension runs at Zone level there aren't significant downsides, besides load/reload times.
However if the Extension is supposed to work at Room level bundling the dependencies into the Extension's jar means that every Room will instantiate a copy of the Extension and relative dependencies.
We don't recommend this approach for Room level Extensions as it can hit the JVM memory hard and it's difficult to optimize. Exceptions can be made if the included libraries have a small size (50-100K) and are low in number.
Hope it helps
no it's not possible, because the dependencies in the main classpath are loaded once, at server startup.
If it always requires a server restart then what are the downsides of building the external jar's into our extension jar to avoid this?
If the Extension runs at Zone level there aren't significant downsides, besides load/reload times.
However if the Extension is supposed to work at Room level bundling the dependencies into the Extension's jar means that every Room will instantiate a copy of the Extension and relative dependencies.
We don't recommend this approach for Room level Extensions as it can hit the JVM memory hard and it's difficult to optimize. Exceptions can be made if the included libraries have a small size (50-100K) and are low in number.
Hope it helps
Re: Is it possible to hotswap external libraries?
Thanks! Exactly the answer we needed.
Who is online
Users browsing this forum: No registered users and 52 guests