Hi everyone,
i'm trying to build an eclipse plugin to act as a client to my ejb3 server application. i have used the code from the applet example to successfully connect to the server from a standalone application, however when trying to use that same code inside a basic eclipse plugin i get a class not found exception. does anyone have a tutorial or an example that i could follow on how to connect to the server from inside an eclipse plugin.
the code that i'm using to connec is:
Client project (inside my plugin code):
try { Context context = new InitialContext(); System.out.println("This is the test "+HelloWorld.class.getName()); HelloWorld hw = (HelloWorld) context.lookup(HelloWorld.class.getName()); hw.sayHello(); } catch (Exception e) { e.printStackTrace(); }
package hello; import javax.ejb.Remote; @Remote public interface HelloWorld { public void sayHello(); }
package hello; import javax.ejb.Stateless; public @Stateless class HelloWorldBean implements HelloWorld { public void sayHello() { System.out.println("Hello EJB3 World !!!! "); } }