From: Andy Jefferson (JIRA) <issues@da...> - 2011-02-24 16:21:44
[ http://issues.datanucleus.org/browse/NUCENHANCER-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Jefferson resolved NUCENHANCER-40.
Resolution: Won't Fix
Annotation processor enhancer is not a good example of use of annotation processing which is, after all, a precompile hook to generate classes etc (like what we do with JDO Typesafe, JPA Criteria).
> JDK1.6 enhancer processor 100 seconds pause
> Key: NUCENHANCER-40
> URL: http://issues.datanucleus.org/browse/NUCENHANCER-40
> Project: DataNucleus Enhancer
> Issue Type: Bug
> Components: JDK1.6 Enhancer Processor
> Affects Versions: 2.0.0.m1, 2.0.0.m2, 2.0.0.m3, 2.0.0.m4, 2.0.0.release, 2.0.1
> Reporter: Andy Jefferson
> When using JDK1.6 and with the enhancer/ASM in the classpath there is a time lag of 100 seconds. This is down to the enhancer "processor" waiting for things to be compiled before it bothers trying to enhance (seemingly). To quote from a users investigation
> "After adding some logging, I see now what the enhancer is doing. As it is called by javac during compilation, it doesn't actually do the enhancement. Instead, it just keep track of which classes use the JDO annotations and builds a list of the corresponding .class files that it expects will be generated by the compilation. It starts up the EnhanceRunnable thread to sit in the background and wait for all of those .class files to be produced by the compiler.
> But there is a problem: if the enhancer isn't looking for the .class files in the right location, that allExists() method will return false, and the loop within the EnhanceRunnable will wait for 100 seconds (1000 iterations of 100ms each). After that loop ends, it will go ahead and try to do the bytecode enhancement anyway.
> In my case, the enhancer is looking for the .class files under "." rather than "./target" ... so it never finds the files in question, and it waits 100 seconds."
> This needs resolving to provide reliable JDK1.6 compilation-stage enhancement
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.datanucleus.org/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira