Reputation: 1763
Hi i often read about this topic the following:
"Tomcat is a servlet container only, which simply means that it will not
provide support for Java EE features."
JPA for example is a Java EE feature. Which means it is supported of Glassfish. But i can also use JPA on a tomcat!
So why can i do that? I thought that i can just stick to Servlet/JSP with a tomcat.
Upvotes: 2
Views: 469
Reputation: 340933
JPA is part of Java EE, which means every Java EE container should support it. Tomcat does not support JPA out-of-the-box. You can use JPA in applications deployed on Tomcat only if these applications embed some JPA implementation.
Typically you'll find Spring applications with Hibernate or EclipseLink embedded, both providing JPA API. Tomcat is completely unaware of that, it's user code as far as he's concerned.
Upvotes: 3