Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The problem is, that every plugin has its own Classloader and Hibernate uses Reflection to find the right classes.</p> <p>I have a very nice article at home about exactly this problem, but this one is in German. I will try to explain what you need to do.</p> <p>In order to have the datastructure shared over several plugins, you have to put it in a plugin and enable a feature called <strong>buddy-policy</strong>. Lets say you have a main-application-plugin which is initiating hibernate on startup, this plugin needs to "see" the classes from the datastructure-plugin. To do this <strong>the main-plugin sets its Buddy-Policy to "registered" and the datastructure-plugin registers itself as a "buddy"</strong>. Unfortunately you have to do this all directly in the manifest file, at least in 3.3 there was no way to do this in the editor.</p> <p><strong>Once this buddy-policy works, Hibernate will also.</strong></p> <p>I looked up my old application and here is how I did it.</p> <ol> <li>The main-application (toolseye.rcp) is dependent on the hibernate plugin (de.eye4eye.hibernate) and the datastructure-plugin (toolseye.datastructures)</li> <li>The hibernate-plugin specifies its buddy-policy as "registered"</li> <li>The datastructure-plugin registers itself to the hibernate-plugin</li> </ol> <p>Here are the important lines:</p> <p>Hibernate-plugin de.eye4eye.hibernate</p> <pre><code>Eclipse-BuddyPolicy: registered </code></pre> <p>Datastructure-plugin toolseye.datastructures</p> <pre><code>Eclipse-RegisterBuddy: de.eye4eye.hibernate </code></pre> <p>Put those line directly in the MANIFEST.MF</p> <p>Both plugins need to reexport their packages in order that the main application or whatever layer you have in between can use them. Hope that helped.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload