Jan Martiska [
https://community.jboss.org/people/jmartisk] created the discussion
"Re: Calling an EJB from servlet"
To view the discussion, visit:
https://community.jboss.org/message/783296#783296
--------------------------------------------------------------
You don't have to put them both into an EAR, but you have to make sure that the
servlet will 'see' the EJB's class - in this case the HelloWorld interface is
enough- , that means the class will be on the classpath. Deployments are indeed isolated
and don't see others' classes.
You may for example copy the HelloWorld interface and put it also into the application
with the Servlet.
The enterprise way is to have a separate 'API-jar' containing just the API, in
this case the HelloWorld interface, which can be used as a dependency for the application
with the Servlet.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/783296#783296]
Start a new discussion in EJB3 at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]