Exactly that! I am seeing the code of src/test/java/com/kenai/tapestryjpa/example/app0/services/UserDAOImpl.java
Here you inject: package com.kenai.tapestryjpa.example.app0.services; import javax.persistence.EntityManager; public class UserDAOImpl implements UserDAO { private final EntityManager entityManager; public UserDAOImpl(EntityManager value) { this.entityManager = value; } public void add(User user) { entityManager.persist(user); } As far as I understand, javax.persistence.EntityManager is an interface, so, there should be any mechanism to determine which impl will be used at runtime, right? Regards, MatÃas. Piero Sartini-3 wrote: > >> My only question now, is "what about tapestry-jpa?" isn't it an >> abstraction >> for my scenario? >> It hasn't documentation yet, but Piero, correct me if I am wrong, if I >> use >> the tapestry-jpa interfaces into my DAO implementation, I would be >> de-coupled from the JPA implementation that I will be using at runtime, >> right? >> >> Anyway, I don't know how I could inject a org.hibernate.EntityManager in >> the >> javax.persistence.EntityManager, since they don't share any interface. > > You don't need the hibernate EntityManager... just inject the JPA > EntityManager. > I've created a demo webapp using JPA2 yesterday. You can find it > inside the subversion repository: > https://svn.kenai.com/svn/tapestry-jpa~main > > Also I've wrote some quick notes on how to get started with tapestry-jpa: > http://kenai.com/projects/tapestry-jpa/pages/Quickstart > > They are work in progress, but maybe its still helpful. > > To make everything easier, there is now also a maven2 repository for > tapestry-jpa: > http://tapestry-jpa.kenai.com/maven-snapshot-repository/ > > Hope this helps. > > Piero > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://old.nabble.com/Is-tapestry-coupled-with-Hibernate-API--tp27111015p27127798.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org