Hi,

it's been a while I used this the last time.
Dll is just a synonym for any linked library :-)

Back to your questions, well as I pointed out, since libraries in general
can't be unloaded unless you destroy the classloader which is taken care by
the OSGi framework and only happens if there are no references to it
anymore.
That's why the library will be "renamed" inside your bundle. So to get a
hold of your library I can't remember right now, if
a) you need to load the library by the new name
b) still can do a loadLibrary as before.

That's the part you need to experiment.
But I'm certain the library will have some renaming to it, though I'm not
sure if there is some "magic symlink" to the library so a loadLibrary(name)
actually works ...

regards, Achim


2015-02-03 14:11 GMT+01:00 Philomatic <[email protected]>:

> Hi Achim,
>
> thanks for pointing out the issue with dynamic linked libraries, indeed I
> did not pay attention to the magic word "dynamic" in the blog post. My
> problem is currently that I'm not really into this topic, but have to deal
> with it from the Java side. Therefore, two questions:
>
> 1.
>
> We have only a single native library, so no reference problems between
> dynamic libs, like you've mentioned. In fact, we actually don't use .dll,
> but .so on linux arm, but that should be the same for loading in OSGi.
>
>
> > Therefore create a statically linked A.dll
>
> How can this be done? I thought a .dll is always dynamic linked?
>
> 2.
>
>
> > the name might need to be "Dynamic" as the container might rename the dll
> > because a dll can't be unloaded unless the corresponding class-loader is
> > destroyed. During this time the second native library will be renamed.
>
> Like said, there is no second native library which could be renamed.
> What do you mean by the "Dynamic" name?
>
> Best regards
> Patrick
>
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Native-library-and-System-load-tp4032562p4038253.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Reply via email to