-
1. Re: sharing library-jar globally in EAR
lafr Mar 31, 2006 1:16 PM (in response to mathias)I would advise against option one and two, but what's the problem with your third option (java module entry in aplication.xml)?
-
2. Re: sharing library-jar globally in EAR
mathias Apr 1, 2006 3:24 PM (in response to mathias)Well, the "having jar in both ejb and war" seems to be kind of the standard approach which is a bit weird to me, since you need to put the same code in multiple places which is not extremely good in the case where i want all in an EAR to use the same classes
I of course don't want to put it in default/lib for the reloading and class scoping problems.
But, the reason i don't like the application.xml-approach either is that if i suddenly realize i need another jar, to redeploy i need to manually edit that file and add one more entry, in contrast to a lib-folder where i put stuff and it's automagically added to the classpath when i redeploy. To me, this is a big minus...
But, of the three options i also think that the last option it's the least bad. But i still think it IS bad... anyone has any other insights? -
3. Re: sharing library-jar globally in EAR
eekboom Apr 3, 2006 12:20 PM (in response to mathias)Can't you just put the library-jar directly in the ear and reference it in the Class-Path in the bean jar's and war's manifest?
Seems to work for me. -
4. Re: sharing library-jar globally in EAR
weston.price Apr 4, 2006 6:30 AM (in response to mathias)Bingo on the last reply, that is indeed the solution. However, this will work for JBoss 4.0 and not for JBoss 3.x. Remember, at the very least to include the version of JBoss that you are using so we can be of better help.
-
5. Re: sharing library-jar globally in EAR
asack Apr 9, 2006 12:12 PM (in response to mathias)"weston.price@jboss.com" wrote:
Bingo on the last reply, that is indeed the solution. However, this will work for JBoss 4.0 and not for JBoss 3.x. Remember, at the very least to include the version of JBoss that you are using so we can be of better help.
Weston (or anyone), can you please tell me what Classloader repository these libraries get added to when you use the MANIFEST approach?
I'm doing this with iBatis within an EAR but what happens is then iBAtis can not find external XML files that are part of my JAR within the EAR. I've tried even jar'ing them up into an optional library, adding it to my JAR's MANIFEST file, and that doesn't work...thought I could get both coming from the same repository. The only way I seem to be able to get it to go is to call getObject().getClassLoader() and set the thread's CurrentContextClassLoader(). But that then causes iBAtis not to find some result objects that exist in the optional library I'm trying to share across EARs.
I'm using 403SP1 with EAR isolation on (I believe if I set it to false, it will work but that's not what I really want).
Am I doing something wrong? -
6. Re: sharing library-jar globally in EAR
starksm64 Apr 9, 2006 5:40 PM (in response to mathias)The deployment class loader with the manifest. Still waiting for the jira issue.
-
7. Re: sharing library-jar globally in EAR
asack Apr 10, 2006 7:10 AM (in response to mathias)"scott.stark@jboss.org" wrote:
The deployment class loader with the manifest. Still waiting for the jira issue.[/quote
Alright Scott, I just thought this was pilot error on my part. I will file it today (promise).] -
8. Re: sharing library-jar globally in EAR
asack Apr 10, 2006 9:03 AM (in response to mathias)http://jira.jboss.com/jira/browse/JBAS-3086
Hope that makes sense Scott. Again this could be pilot error on my part but so far it seems very wrong right now the way MANIFEST Class-Path entries are handled by the EAR deployer.
I appologize in advance if I filed the bug incorrectly! :-)!