This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a classloader related problem with EJB JAR resources. Here's the situation:
We have several EJB JARs packed in the same EAR. Each EJB JAR contains a single stateless session EJB. The EJBs are looked up by reference from a single web application in the EAR. Each EJB class uses JAR resource files from its EJB JAR file (xml, xslt files). These files are retrieved using getClass().getResourceAsStream(). And here's the problem:
If a JAR resource file with the same name exists in more than one EJB JARS the same file is retrieved no matter from which session EJB class getClass().getResourceAsStream() is called. Here's a more schematic explanation: