This is the scenario: I created an EJB project in eclipse on wildfly as a server. The EJB project It has been deployed with its beans, and is ready in the wildfly administrative console.
Now I need to create a remote client to use the EJB project beans. I understand that this is done through a context lookup. Therefore, it included the following code in the client:
Context ctx = new InitialContext(jndiProps);
// lookup the bean Foo interface lives inside the remote EJB
Foo beanRemoteInterface = (Foo) ctx.lookup("myapp/myejbmodule/FooBean!org.myapp.ejb.Foo");
The problem is that, since the EJB and the client are in separate projects, the Foo interface as unknown in the code from the client and I cannot have the client compile because the Foo type is not found.
- Is there any way to obtain this remote class reference on the client? -How can I make the client code compile in eclipse?