Community
Participate
Working Groups
Build Identifier: 20100617-1415 We use static weaving while development. For each build we wait 40 seconds for static weaving to process 20 entities on 2,4Gh 2Core PC. Can it be improved? Reproducible: Always Steps to Reproduce: 1. Create some entities (something like 20) 2. Create ant file for static weaving 3. Run it 1000 times. 4. Wait 11 hours (40 sec * 1000) 5. Hate it.
I just found out that, it only happens if you weave to the same direcotry, where the original classes are. If you weave to somewhere else, it lasts just 5 seconds.
I found out that the problem only occurs on Windows XP. My colleague has Windows 7 and the weaving lasts 5 seconds. So I coded the weaving for WinXP in this way: - rename /classes to /unweaved_<timestamp> - waave from /unweaved_<timestamp> to /weaved_<timestamp> - move from /weaved_<timestamp> to /classes Only that way it works fast on WinXP.
The possible solution is may be to not use URLClassLoader in org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor in process(). The line is: this.classLoader = new URLClassLoader(getURLs(), this.classLoader); May be there is a classLoader that doesn't lock the files.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink