I believe I have finally fixed the Windows file lock problems. After extensive debugging and inspection of heap dumps, I am convinced the Windows file handling in the Sun VM is simply broken. I tried a few of solutions, but the only one that works reliably is to copy all jar files to a temp location before adding them to a class loader. This is the approach Tomcat takes when you enable antJARLocking in an application.

OpenEJB's AntiJarLocking is enabled only when running on Windows and only when not in embedded (test) mode. When embedded AntiJarLocking is simply not needed because jars are not deleted which means there is no file locking problem. AntiJarLocking can be explicitly controlled by setting the case-insensitive System property "antiJarLocking". When running non-embedded the temp files are stored in $openejb.base \temp, and in embedded mode they are stored in $java.io.tmpdir/OpenEJB- temp-RANDOM (but you shouldn't turn this on in embedded mode).

If you are on Windows, please give this a try. I think it is critical to the success of this project to have flawless Windows support.

Thanks,

-dain

Reply via email to