Who runs the EJB Classes in WAR File
From the Java EE6 documentation, I could see:
To include enterprise bean class files in a WAR module, the class files should be in the WEB-INF/classes directory.
To include a JAR file that contains enterprise beans in a WAR module, add the JAR to the WEB-INF/lib directory of the WAR module.
With this structure, EJBs are part of WAR file. I can have some JSP and Servlet also inside my war file.
I've also read that an Application server contains two containers, one of them is web container that handles all the JSP/Servlets and an app container that handles all the Enterpriz开发者_StackOverflowe beans.
I'm assuming that If I deploy this WAR file (that contains EJB + JSP/Servlets
), App-Server will be smart enough to delegate the processing of JSP/Servlets to Web Container
and EJBs processing to app containers
? Is my assumption correct?
Yes, your assumption in correct.
精彩评论