Which choice are you referring to ? Runtime Enhancing vs Compiling or
using AOP to solve the lazy loading problem ?
Regarding lazy loading, I prefer to handle it in a manner where the
developer knows it should reload/refresh an entity in each app.
transaction. Dont know about your solution, so I cant comment.
Regarding bytecode enhancing vs. post-compiling, both have drawbacks.
With bytecode enhancing you'll have problems with generated classes
if you use instanceof alot, classloading problems, and sometimes buggy
implementations in libraries. With postcompilation, debugging wont be
easy because of the extra code inserted between your code. OTOH,
performance is better with compiletime weaving. Read Adrians comment
on this : dev.eclipse.org/.../msg07094.html
Unfortunately Sun hasn't provided a good solution to intercept method
calls in java. Maybe someday we all have a unique solution for this
problem !