I have a simple question (and silly – shame on me 🙂
As far as I understand, Tomcat is a web container which implements Servlet/JSP specifications. Tomcat is not a full-powered Java EE app server – therefore, I cannot deploy and run a EJB-based application on Tomcat.
So far so good.
But… I’m able to deploy and run JSF applications on Tomcat. JSF – as far as I understand – it’s part of Java EE and is “backed” by EJBs (e.g., you use stateless/stateful beans).
Bottom line: Why am I able to run JSF applications backed by EJBs and not able to deploy a “regular” EJB application (i.e., non-JSF).
Thanks in advance =)
As others have clarified, EJB != JSF. That said, you can get EJBs to work with Tomcat and JSF via Apache TomEE. You can drop it into a Tomcat 7 install or just use a binary which is already setup. TomEE was built exactly to answer the “who do I use X on Tomcat” question.
Here is also a getting started video which shows EJBs, CDI working on Tomcat hooked up to Eclipse.