Absolutely not. With EAR isolation turned off, that means that the first
verison of ejb-jar-file will be used for ALL EARs. I'm not sure why you've
turned off java2Parent delegation exactly either since you have EAR isolation
turned off (as per WIKI, java2Parent delegation is to prevent an EAR from
grabbing a cached version of library first before checking if its packaged with
it - dom4j.jar is a good example where you could run into problems if you need
XPath as well as incompatibilities with cglib which is packaged in several
places depending on JBoss build!).
If you are including this jar file in both EARs then why not do the following
to prevent incorrect classloading issues:
- turned EAR isolation on (IMO should be the default, more than likely its not
for historical/compatibility issues)
- include the jar file in both EARs or have a singular library deployed outside
of both EARs
- any modules within an EAR that are using this client side jar file have a
reference to it in their MANIFEST.MF file via the Class-Path entry
For example this is what I have in my current project:
EAR isolation turned on (java2Parent delegation is on as well)
deploy:
my-lib.jar (has global scope across deployments)
my-module-1.ear
my1.jar (MANIFEST.MF has Class-Path: lib/optional-lib.jar)
lib/optional-lib.jar
my-module-2.ear
my2.jar (MANIFEST.MF has Class-Path: lib/optional-lib1.jar)
my3.war (libraries are picked up from WEB-INF/lib according to
Servlet spec, I could put a MANIFEST.MF entry here as well if
optional-lib1.jar was needed by the WAR and was NOT in WEB-INF/lib)
lib/optional-lib1.jar
Works like a champ for me. I'm using local interfaces since remoting seems
like overkill to me within the same VM (not to mention dirt slow).
Remember, a classloader uses both the classloader repository (uri. etc) and
classname to determine the right class. If you are packaing the same class all
over the place and are unscoped you ARE ASKING for ClassCastExceptions as per
all the WIKIs on this site!
Hope some of this helps and makes sense...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3938657#3938657
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3938657
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user