IF you have the jar, war and 3rd party as peers,
Create a manifest file for your jar and include a classpath entry in the manifest which points to the third party jar. Something like
This way, when you package ur jar, war and 3rd party jars in a ear, the ejb could find the 3rd party jar as its in manifest and the web could also get it because of the parent ejb class loader.
If you have the 3rd part jar in deploy dir directly,the jboss unified class loader would load ur jar and all the ejb, war would be able to use it!
Ok. This is what I've tried.
I created a jar (a.jar) in which I've placed all other third party jars, the application depends on (russian doll packaging). I have an ejb jar (b.jar) that references a.jar via Class-path in the manifest. I have a war (c.war) that also references a.jar via Class-path in the manifest.
One of the classes that exists only in c.war depends on one of the classes in a.jar.
When I deploy this EAR in jboss 3.0.4 it starts properly, when I delopy it in jboss 3.0.6 it fails with NoClassDefFoundError for a class that exists in a.jar (during web container initialization)
For the time being I'm deploying a.jar directly to the deploy directory and all works fine. I'm curious about this behavior however. Any thoughts/suggestions?