I need to enhance the entities in my current project because otherwise with
'fall-back' enhancement, the core functionality of the application cannot be
run, due to StackOverflowErrors (because of the large number of unenhanced
entities that OpenJPA has to deal with, according to JIRA and the mailing list
archives).
I'm running Java 1.6.0_12 so I think I'm right in saying that the runtime
enhancement used by OpenJPA on the unenhanced entities will be Java 6 class
retransformation - but it's causing the issue above.
I have tried specifying the javaagent as a JVM option, but I have some problems
with this in the web server. I'm using tomcat and it looks like I have to put my
complete webapp into tomcat shared directory so that the enhancement process has
the classes available at boot.
My entity beans have a fair amount of encapsulated business logic so there are a
fair number of external utility classes and jar dependencies.
Is there a way to configure the javaagent on a per-website basis for tomcat?
Secondly I have configured the openjpa-maven-plugin so that it launches the
PCEnhancer during my maven build, but the x*?!"@ app doesn't run with the
build-time enhanced classes.
It just hangs while loading the webapp, when Spring tries to load the managers
(the transaction-wrapped business tier). That's both during integration testing
with JUnit and when deployed in tomcat.
I think that sums up my current situation. Can anyone suggest a way forward?
regards
Adam