which Geronimo version do you use ? I doubt there is a normal way to make the class-path in MANIFEST.MF work in the plugin, maybe someone else could points it out.
One side, the native library should be unloaded with the destorying of the target classloader. There maybe a leak issue somewhere if it always reports error.
From another side, IMO, It looks to me that shared library should be a good choice for you. Depending on which version used, you could just google and find the corresponding doc in Geronimo wiki.

2012/1/23 easyl <thlin.box@gmail.com>

I need to develop a Java library which uses JNI with OS dependent native
libraries, and such Java library will be used by some deployed EAR
application on geronimo.

I have tried to directly wrap my EAR application with native libs together
and it did work, however it will lead to a duplicated loaded native library
error if I redeploy the EAR application. Therefore, I decide to develop such
Java native libs as a independent JAR plugin on geronimo. Namely, I will
'install' my Java native lib from geronimo http console "Repository Viewer -
Add Archive to Repository" and add the 'dependency' in each EAR's deployment


Is there any example that I can learn from?

My plugin structure looks like the following

     + **.java
     + **.jar
     + **.so **.dll

Can this plugin jar contain other 3rd party jar files?
Will native lib still work when they are stored in a jar?
Should I take care of MANIFEST?

View this message in context: http://apache-geronimo.328035.n3.nabble.com/Build-a-plugin-jar-with-mative-libs-on-geronimo-tp3681767p3681767.html
Sent from the Users mailing list archive at Nabble.com.