Mantis - Resin
Viewing Issue Advanced Details
3601 major always 07-16-09 16:32 08-27-09 15:10
closed 3.1.9  
none 4.0.2  
0003601: Automatic classpath scanning for EJB's fails under certain conditions
I was working on a project upgrading our resin server from version 3.1.5 to version 3.1.9.

The classpath scanning for auto-discovery of EJB's is broken in version 3.1.9 of resin and above. I am trying to deploy an .ear file with .jar and .war files inside. The .jar file contains EJB's. Please find attached a test.ear file demonstrating the problem.

I have debugged the resin server and have tracked down the problem to ( lines: 1272 and 1163) where it is calling sendAddLoaderEvent();.

Calling sendAddLoaderEvent(); prematurely causes the boolean _hasNewLoader to become false. This becomes a problem later when more URL's from the deploy directory have been added by ( line: 534, scan() function) and the ( line: 573, start() function) calls sendAddLoaderEvent();. As the boolean _hasNewLoader is now false the deploy directory is not scanned and the EJB's are not found by the server.

Later I fixed the bug by removing the Class-Path entries from the MANIFEST.MF file. Exactly why the class-path entries in the manifest affect the scanning of the deploy directory when the jar(with ejb's in it) is expanded eluded me.

Note: The Class-Path entries in MANIFEST.MF in the earlier version of resin did not affect the loading of EJB's. This bug must have been introduced in a version between 3.1.5 and 3.1.9.

 test.ear [^] (56,384 bytes) 07-16-09 16:32

08-27-09 15:10