Thanks for getting back to me. The enhancement link is relevant, but as I mentioned in the original mail, I thought I'd already brought in runtime enhancement using the OpenJPA agent.
Using Java invocation would be hugely preferable. Can I manually configure the MethodInterceptor capabilities of a Dependency Injector to explicitly trigger whatever augmentation is needed, as described here? Are there examples of this being done elsewhere? http://code.google.com/p/google-guice/wiki/AOP To achieve enhancement I used a post-compile enhance.xml Ant task, combined with -javaagent:lib/openjpa/openjpa-all-2.0.1.jar=jdoEnhance=true,scanDevPath=true passed to the VM on launch. At this stage I've no idea which of these is actually doing the enhancement and how, which is why I'm working to avoid a skyhook programming model. All the mechanisms seem to rely on the use of a persistence.xml file in META-INF - pretty unsatisfactory to drop out of Java and into a type-unsafe serialisation language, but I can't find an alternative mechanism. To get it working I've resorted to a manual list of strings inside <class></class> elements. All classes (including abstract mapped superclasses) had to be listed here, so the inheritance structures in Java weren't being employed either! Is there a way to simply pass a list of classes into a Java method in an unmodified VM, recursively trigger introspection of a whole package or even have my java persistence invocations configure things? The MethodInterceptor model would be the ideal way to go for me, but I don't want to go so far under the hood that it clicks shut behind me. Cefn http://cefn.com ________________________________________ From: Rick Curtis [[email protected]] Sent: 16 November 2010 15:54 To: [email protected] Subject: Re: OpenJPA Enhancement fail - suggestions? How are you enhancing your classes? Please take a read through this page[1]. [1] http://openjpa.apache.org/entity-enhancement.html Thanks, Rick
