eclipseeclipse-rcpeclipselinkequinox

Enable weaving in an Eclipse RCP application


I use EclipseLink 2.4.1 in an RCP application. When starting the application I get warning messages like

  Reverting the lazy setting on the OneToOne or ManyToOne attribute [...] for the entity class [class ...] since weaving was not enabled or did not occur.

The reason is explained here and here. The answers point to the eclipse link documentation and the eclipse link user guide. The solution to enable dynamic weaving is

... the EclipseLink agent must be used when starting the Java VM.

 java -javaagent:eclipselink.jar

My question is

Do I have to include the bare jar eclipselink.jar in my distribution (where?) or is it sufficient to add a dependency to some special eclipse link plugin, e.g. to org.eclipse.equinox.weaving.hook?

After further research I see that Gemini/JPA may be a solution. However, I'm still puzzled how to get all pieces together.


Solution

  • Yes, Gemini JPA is the way forward as it provides Enterprise OSGi JPA support with EclipseLink. It also supports weaving using standard OSGi byte code weaving.

    You can get Gemini JPA help on the forum: http://www.eclipse.org/forums/index.php?t=thread&frm_id=153

    --Shaun