Using JPA with Spring 2.0 or the Java Agent issue

Maybe this article is the main reference about JPA in Spring 2.0. It’s a great resource to start playing with JPA technology but it does not include any comment relative to a key issue: load time weaving. This technique is responsible of any class transformation from generic database objects to customized domain beans.

Spring’s 2.0 reference include several options to perform this work hooking application’s container resources and describe standalone support via java agent (VM option -javaagent:/path/to/spring-agent.jar). In Spring 2.5 hooking options have been increased (p.e. Weblogic only is available since this version).

I was evaluating a migration from Hibernate to JPA but this issue make me doubt. It seems as if they were using a bazooka to kill a fly!