Using JBoss EJB 3 with Eclipse RCP [Part 4]
- Am 20. Mai 2007
- Von jmc
- In Eclipse IDE, EJB 3.0, English, Java, JBoss
1
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.

In the last part I will show you how to create some test code to ensure anything is working.




JMCblog » Blog Archive » Using JBoss EJB 3 with Eclipse RCP [Part 3]
[...] Now we need to define the dependency between the two plugins and create a Buddy-Policy. I’ll show that to you in part 4. [...]