Jim, Gareth,
I improved the runtime enhancement of triggered by the openejb-
javaagent.jar so that it does a preliminary scan for persistence.xml
files and causes the persistence provider to enhance all the classes
listed in your persistence.xml files.
The result is that you should not need to use the ant-run plugin to
enhance before the running of the test case nor should you need to
ensure the JPA Entity classes are not loaded before the InitialContext
is run (other users have reported that workaround). Anyway, all
should be well with just the agent.
I've published new openejb 3.1-SNAPSHOT jars to the snapshot repo
[1]. A zip is available for non-maven users [2]. Is it possible you
can give this a try with your setup and give a thumbs up or thumbs down?
I've added a few options for getting verbose output so that it's easy
to see things working. One is to pass "debug=true" as the <options>
portion of the agent ("i.e. -javaagent:<jarpath>[=<options>]).
Another is to include a "PersistenceBootstrap.properties" file in your
classpath that has "debug=true".
We definitely want to get this feature solid for the coming release.
Any testing/feedback very appreciated!
Thanks!
-David
[1] http://people.apache.org/repo/m2-snapshot-repository/
[2] people.apache.org/repo/m2-snapshot-repository/org/apache/openejb/
openejb-standalone/3.1-SNAPSHOT/openejb-
standalone-3.1-20080814.084652-1.zip