Gareth, Recently, I found an obscure problem with the IBM JDK when using the javaagent enhancement, but I don't see how this would apply to this situation. You end up with a nasty exception from the Java runtime, and I would think you would have mentioned that...
Other than than, I am not aware of any differences between the two forms of enhancement. One idea is to ensure that the -javaagent is really taking effect. Besides these two enhancement mechanisms, there is a third fallback mechanism. This fallback mechanism is not quite "ready for production" and I would recommend turning it off. We do that for WebSphere. openjpa.RuntimeUnenhancedClasses=unsupported (along with your -javaagent setting) This can be specified as a property in their persistence.xml or as a java command line parameter (-Dxxx=yyy). If you are accidentally falling into this third style of enhancement, then you will get an error about a particular entity not being enhanced and your processing will quit. At least this will show whether you are using your -javaagent like you expected. Do you have a simple testcase that you could share to demonstrate the problem? Thanks, Kevin On Wed, Jul 16, 2008 at 4:34 AM, Gareth Davies <[EMAIL PROTECTED]> wrote: > Hi > > Openjpa 1.1.0 > > I am having a problem with runtime enhancement on my persistent > entities. Runtime enhancement completes during my test phase using the > openejb 3.0 javaagent, but when the unit tests run I have problems > relating to merges using the entityManager. The id field does not seem > to be generated correctly it seems to be giving it a 0 value rather than > the next available id and it doesn't actually seem to be inserting into > the database. I have tried the same build process using build time > enhancement and all the tests pass (I would use build time enhancement > but having tried it during the build with the openjpa-maven-plugin, > which seems to only support openjpa 0.9.6, my command line is too long > ~16100 characters and Windows limit is 8192, I had to resort to a batch > file). > > Has anyone else had any issues with this, or are there difference > between runtime and build time enhancement that are causing these > failures. > > Also if anyone has any ideas about getting the build time enhancement to > run as part of a maven build without using the openjpa-maven-plugin that > would be great. > > Thanks > > Gareth Davies >
