Re: Build a plugin jar with mative libs on geronimo

2012-01-24 Thread Ivan
To use the default shared library, places all your jar files in the
var\shared\lib, and configure the dependency below in your application
plan, then all those classes should be available in your ear application.

org.apache.*geronimo*.configs
<*artifactId*>*sharedlib*

Hope it helps.

2012/1/24 easyl 

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



-- 
Ivan


Re: Build a plugin jar with mative libs on geronimo

2012-01-24 Thread easyl
Geronimo 2.2.1

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


Re: Build a plugin jar with mative libs on geronimo

2012-01-23 Thread Ivan
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 

> Hi,
>
> 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
> descriptor.
>
>   
>
>
>   
>
>   
>
>
> Is there any example that I can learn from?
>
> My plugin structure looks like the following
>
> mypluin-1.0/
>   src/
>  + **.java
>   3rd-lib/
>  + **.jar
>   native-lib/
>  + **.so **.dll
>   META-INF/
>  + MANIFEST.MF
>
> 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.
>



-- 
Ivan


Build a plugin jar with mative libs on geronimo

2012-01-23 Thread easyl
Hi,

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
descriptor.

   


   

   


Is there any example that I can learn from?

My plugin structure looks like the following

mypluin-1.0/
   src/
  + **.java
   3rd-lib/
  + **.jar
   native-lib/
  + **.so **.dll
   META-INF/
  + MANIFEST.MF

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.