Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Enhancer (ARCHIVED)

JDK1.6 enhancer processor 100 seconds pause

Created: 06/Jun/09 10:29 AM   Updated: 01/Apr/11 03:27 PM   Resolved: 24/Feb/11 05:21 PM
Component/s: JDK1.6 Enhancer Processor
Affects Version/s: 2.0.0.m1, 2.0.0.m2, 2.0.0.m3, 2.0.0.m4, 2.0.0.release, 2.0.1
Fix Version/s: None

Forum Thread URL:,5571_offset,10

 Description  « Hide
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

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 24/Feb/11 05:21 PM
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).