This content has been marked as final. Show 2 replies
You don't have to generate anything, you need the business interface class in your client application (MyEJBRemote in this case). One way to do that is to put the business interfaces in a separate jar and link that jar in both your client and server projects. The glassfish 3 FAQ documents the need to include the business interface class in your client application:
Another option is to turn the EJB into a JAX-WS webservice, which can be as easy as only adding a few annotations to it. That way you don't need any additional dependencies at all; the only thing you need to do is generate the stub classes using the wsimport tool (also part of the JDK) for your client application. I'm not a huge fan of SOAP, but for internal use I find it less cumbersome and more portable than remote EJBs.
I can't offer any more advice on the topic as I don't use Glassfish. For better help, I do advise you to ask in the Glassfish forum where you'll find more people that have been in the same boat you are.