This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I have an EAR file. I would like to have a jar file which could be accessed by both EJB(JAR) and Web(WAR) modules with in the EAR. If i put this jar file in the top-level directory inside the .ear file is it accessible by both the EJB and Web modules? If not where should i put the common jar in EAR file to be accessed by both EJB and Web modules?
Originally posted by Peter Johnson: If you place the JAR file in the base directory of the EAR, and include it in the application.xml file, then it will be available to both EJBs and WAR.
In 5.0, you could also place it in the lib directory within the EAR. Then you do not need to add it to the application.xml file. I am not sure if this scheme would work on 4.2.x.
Peter, It worked! but, just curious to know: If we add the jar file to the class path thru manifest files(Class-Path: common.jar) in ejb-jar and war files. is common.jar accessible to both the modules?