I am developing a Dynamic web project (Java EE) using JSF, PrimeFaces, JPA, and running on Tomcat 7. The project development is based on http://www.simtay.com/simple-crud-we
The given example requires JTA, Java Transaction API. It will delegate the transaction management to the container. With JTA enabled, if you're using a @Stateless
EJB, then a single method call counts by default as a single complete transaction. This allows you to write clean code without any tx.begin, tx.commit, tx.rollback, etc boilerplate.
Like JSF, EJB and JPA, JTA is by default not available on a barebones JSP/Servlet container as Tomcat and Jetty. Like JSF, EJB and JPA, you'd need to install JTA separately on Tomcat.
An alternative is to switch from a JSP/Servlet container to a real Java EE (web profile) container, such as Glassfish, JBoss AS and TomEE. It offers everything directly out the box with regard to Java EE. Note that JBoss AS and TomEE basically use Tomcat's JSP/Servlet engine under the covers.