Using JBoss EJB 3 with Eclipse RCP [Part 4]
Dependencies und Buddy-Policy
First we need to declare the RCP dependend on the JBoss-plugin.
Now we define the Buddy-Policy in the JBoss plugin ( insert “Eclipse-BuddyPolicy: registered” in the Manifest.MF) and let the RCP-Plugin register as a buddy (insert “Eclipse-RegisterBuddy: org.jboss.client” in the Manifest.MF). Please ensure that there is always a blank line at the end of the Manifest.MF and there is no whitespace in front of the “Eclipse-…”!
Insert the EJB-Classes in our RCP-Plugin
We need to let our plugin know the EJBs it should work with. Inside the project we create a new folder called “libs” and copy the file MyTestStatelessSession.jar into it. Now we will refresh the project and add the JAR to the build path by right-clicking on the file and choose Build Path > Add to Build Path. The result should look like this:
As a last step we need to add the EJB-Jar to the classpath under Runtime. Without this step our JBoss-Plugin is not able to find the classes at runtime.