Deploy your EJB jar and your dependency library within one EAR.
in fact you can even just throw the dependency lib in you deploy directroy. But I would prefer the EAR.
yes, you can just put it in the deploy dir, but then all deployed applications share that libraries.
putting the library in the ear doesn't work in JBoss 4.0.0 default configuration. it would only work, if you define the path to that library in the manifest class-path og your ejb jar-file. but then it gets loaded in the system classloader and not in the isolated classloader of the application.
I'm still looking for a solution......
Jochen, or anybody else
Have you figured this problem out? I am having the same problem.
What is the same problem that you are experiencing?
Are you trying to make a library available to your components or are you trying to make a library available to your components whilst keeping the library confined the issolated classloader of your application?
the second guess is what I'm trying to do.
I want to make a library available to my components and want to keep it isolated together with that component in its isolated classloader.
putting an entry in the manifest doesn't do this, right?
and having the library in the system classloader doesn't work. on one hand for isolation reason bewteeen different versions of the same libraries, on the other hand I get problems with the library dynamically loading classes from my components via reflection.
I have the same problem. With JBoss 3.2, I placed my libraries jars in MyEJB.jar/META-INF/lib/ and it worked. But with JBoss 4.0.1RC2, the trick doesn't work anymore :-(
Deploy your shared components in
/default/ dir packed in a .JAR (NOT .EAR)
.JAR it's shared by classloader.
that's exactly what I do at the moment as temporary workaround.
but what can I do, if I have two different versions of that jar for two different applications (.ear files). each of that utility jar-files have to be in the classloader of the corresponding application.....
is it possible to have a "jboss-app.xml" file in a utility (not ejb) jar-file where I can set the same loader-repository as in the ear file?
If you are packaging in an ear in 4.0.0 try with
in the ear-deployer.xml