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.

Declaring dependency

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-…“!

Buddy-Policy festlegen
Buddy-Policy festlegen

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:

Adding EJB-Classes

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.

EJB-Jar dem Classpath hinzufügen

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

Ein Gedanke zu „Using JBoss EJB 3 with Eclipse RCP [Part 4]“

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *