I was just thinking: How to handle this in production environments? E.g.
Imagine some of your bundles depend a DLL (or .so) and this DLL needs to be
updated. So all you can do is replace the DLL, shutdown and restart the
container?


On Tue, Mar 18, 2014 at 10:06 AM, CLEMENT Jean-Philippe <
jean-philippe.clem...@fr.thalesgroup.com> wrote:

> Hi,
>
> 1. As far as I know you cannot
> 2. Maybe GlueGen can help you (NativeLibrary)
>
> JP
>
> -----Message d'origine-----
> De : Frizz [mailto:frizzthe...@googlemail.com]
> Envoyé : mardi 18 mars 2014 06:35
> À : users@felix.apache.org
> Objet : JNI: unloading a DLL from the container
>
> Hi there,
>
> I have a bundle where I load a DLL with System.load(dllFileName).
>
> Once I redeploy the bundle I get an exception:
> java.lang.UnsatisfiedLinkError: Native Library c:\demo\libs\myLib.dll
> already loaded in another classloader
>
> I assume this happens because DLLs are only loaded once for the JVM. So
> when the bundle is redeployed, the DLL is accessed from a different class
> loader and an exception is thrown.
>
> Two questions:
>
> (1) How can I unload a DLL from a container?
>
> (2) Simply putting the DLL in the container lib/ext or lib/native folder
> (to be loaded at runtime) is no solution for me, because I'm still in the
> development phase of the DLL - so the code changes quite frequently. So I
> need a way to REDEPLOY my bundle (I usually do a dev:watch during
> development). Any suggestions?
>
>
> cheers,
> Frizz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>

Reply via email to