How to EJB 3.1 Deployment in Tomcat 5.5.x [duplica

2019-01-29 01:17发布

问题:

This question already has an answer here:

  • How to deploy EJB based application on Tomcat 4 answers

I have hosting plan which supports

i) Tomcat - 5.5.xSupport

ii) JDK - 1.6.x Support

iii) JSP/servlet - 2.0 Support

Am I able to deploy EJB 3.1 on this setup? I've heard that Tomcat does not support EJBs, but hopefully there is a workaround. Any advice is appreciated.

回答1:

Apache TomEE was previously the openEJB project if i am not mistaken. You can use the openEJB libraries provided to deploy ejbs on your tomcat instance. More on how to setup can be found at the followinglink:

http://openejb.codehaus.org/tomcat.html



回答2:

That's right, Tomcat is just a servlet container, thus you can deploy servlets and JSPs, but not EJBs. You need an application server like JBoss or Glassfish.

There is also an Apache TomEE project built on top of Tomcat and probably you can embed some lightweight EJB container inside Tomcat.