> For both JPA/Hibernate, you have two ways to go: > > 1. Container-Managed EntityManagers and transactions. > > By this I mean that you're using @PersistenceContext and such in your classes > so that your web application container (i.e. GlassFish) manages the > EntityManagers and the transactions. The Tapestry jumpstart uses this > approach.
It would be really great if this possibility would be available. Unfortunately, @PersistenceContext does not work in Tapestry pages or services. This whole JavaEE DI stuff is only available within servlets or EJBs. That's why tapestry-jpa is neccessary. Some time ago people said it is better to not depend on the servlet api. They argumented it's bad if your controller classes need to extend some base classes. Frameworks ignored the specification and now they do not get all the great stuff for free that gets better and better with each release of JavaEE. Struts2, Wicket and many others do have the same problem. All of them need to reinvent the wheel when it comes to persistence... tapestry did the best job imho, but is not able to use JPA instead of the hibernate APIs. That's where tapestry-jpa tries to help.. Piero --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org