【问题标题】:Enable weaving in an Eclipse RCP application在 Eclipse RCP 应用程序中启用编织
【发布时间】:2013-05-31 00:02:09
【问题描述】:

我在 RCP 应用程序中使用 EclipseLink 2.4.1。启动应用程序时,我收到警告消息,例如

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

原因解释herehere。答案指向eclipse link documentationeclipse link user guide。启用动态编织的解决方案是

...启动 Java VM 时必须使用 EclipseLink 代理。

 java -javaagent:eclipselink.jar

我的问题是

我是否必须在我的发行版中包含裸 jar eclipselink.jar(在哪里?)或者添加对某些特殊 eclipse 链接插件的依赖项就足够了,例如到org.eclipse.equinox.weaving.hook?

经过进一步研究,我发现Gemini/JPA 可能是一个解决方案。但是,我仍然对如何将所有部分组合在一起感到困惑。

【问题讨论】:

    标签: eclipse eclipse-rcp eclipselink equinox


    【解决方案1】:

    是的,Gemini JPA 是前进的方向,因为它通过 EclipseLink 提供 Enterprise OSGi JPA 支持。它还支持使用标准 OSGi 字节码编织。

    您可以在论坛上获得 Gemini JPA 帮助:http://www.eclipse.org/forums/index.php?t=thread&frm_id=153

    --肖恩

    【讨论】:

      最近更新 更多