Following a long weekend of getting started with EJB3.0, I spent a while trying 
to figure out how to share libs across modules in the EAR. I know from 
searching that this topic has been beaten to death in other forums, but there 
are new options in Java EE 5 that either haven't been discussed or eluded my 
search. It seems to be a common source of confusion for J2EE (er, JEE?) 
developers, especially those just getting started. 

I'd like to propose a new Wiki for sharing libs in an EAR, and naturally, I'll 
volunteer to write it. I found the info I needed eventually, but the existing 
classloading wikis are a bit overwhelming, and I sense the community would 
benefit from a concise reference for this simple, common task. According to the 
latest proposed final draft of Java EE Spec., v5, we should have the following 
options for accessing shared libraries in an EAR file:

anonymous wrote : 
  | 1. Class-Path header in the referencing JAR's manifest file. 
  | 
  | 2. A .ear file may contain a directory that contains libraries packaged in 
JAR files. The library-directory element of the .ear file?s deployment 
descriptor contains the name of this directory. If a library-directory element 
isn?t specified... the directory named lib is used... All files in this 
directory (but not subdirectories) with a .jar extension must be made available 
to all components packaged in the EAR file. 
  | 
  | 3. A web application may include libraries in the WEB-INF/lib directory. 
  | 
I couldn't get the first two options to work, however I resolved my 
classloading problems by adding  <module><java>lib/mylib.jar</java></module> to 
my application.xml. 

First, is anyone against a new Wiki for this information? If not, I'd welcome 
guidance, suggestions, references, links, etc. 

Second, has the library-directory option been implemented, as of RC3? 

Regards,

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3919181#3919181

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919181


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to