THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- right-click on Project, click "Add/Remove Bytecode Enhancer"
- in the Enable OpenJPA dialog which will be shown: (TBD: Attach screenshot here, once ugly OPENJPA-1521 is resolved?)
- choose if OpenJPA libraries should be added to project, this will copy the OpenJPA JARs from the Eclipse plug-in into a lib directory of the Java project, and add them as Referenced Libraries. (In a normal existing project you'll already have them via Maven or otherwise, but for test projects this is convenient.)
- choose enhancement options, if you need any. These are the same options as the CLI PCEnhancer supports
- menu Project > Properties (or right-click on Project > Properties) should now show the "OpenJPA PC-Enhancer Project Builder" added after the usual "Java Builder"
- when Eclipse builds (compiles) the project, classes will now be byte-code enhanced
Known Limitations
- persistence.xml is ignored, the plug-in / builder only looks for annotations annotations (@Entity, @MappedSuperclass, @Embeddable, @ManagedInterface) to decide if a class actually needs enhancement
Options
- ... **/*Entity.java ...
Troubleshooting
- If your Eclipse dies due to "java.lang.. debug ...OutOfMemoryError: Java heap space" / "java.lang.OutOfMemoryError: PermGen space" issues, you may need to add e.g. "-XX:PermSize=64m -XX:MaxPermSize=256m -Xms128m -Xmx512m" to your eclipse.ini (each option on a separate line) for the enhancement builder