-
1. Re: Best Practices for Packaging
rdoust May 21, 2002 3:53 PM (in response to rwaugh)I'd be very intersted as well. Specifically though, I have a problem accessing EJBs deployed in jars outside the war/ear. That is, I package application specific EJB in a jar, package that into a war. It requires access to EJBs that are packaged outside of the ear within which the war is packaged. I can't seem to get a manifest file set up correctly to allow the ejb in the jar in the war to find the ejb packaged outside the ear.
Do you know how I can do this? -
2. Re: Best Practices for Packaging
rwaugh May 21, 2002 11:46 PM (in response to rwaugh)> I'd be very intersted as well. Specifically though, I
> have a problem accessing EJBs deployed in jars
> outside the war/ear. That is, I package application
> specific EJB in a jar, package that into a war. It
> requires access to EJBs that are packaged outside of
> the ear within which the war is packaged. I can't
> seem to get a manifest file set up correctly to allow
> the ejb in the jar in the war to find the ejb
> packaged outside the ear.
> Do you know how I can do this?
I believe that you would have a hard time doing this due to the fact that the classloader for the ejb jar outside the ear would be a sibling, so you're not going to be able to resolve the classes effectively. You either need to have the jar as a part of the ear or at least the interfaces that you are dealing with in the ear. This is somewhat of a bummer, but I'm not sure of a method around this. Apparently between J2EE 1.2 and 1.3 the classloader relationships changed somewhat such that EJB's are handled through a single classloader and the WAR's are handled through child classloaders, giving the EJB's the ability to cross reference and WAR packaged classes the ability to load the EJB classes without needing to repackage the EJB classes in the WAR file.
So, it appears that the practice that is recommended is to package EJB's outside the WAR file and everything with the EAR file.
robert