java/HibernateDemo1/HibernateDemo1-ejb/src/java/cz/frantovo/hibernateDemo1/CilDAOBean.java
1.1 --- a/java/HibernateDemo1/HibernateDemo1-ejb/src/java/cz/frantovo/hibernateDemo1/CilDAOBean.java Sat Mar 14 22:14:59 2009 +0100
1.2 +++ b/java/HibernateDemo1/HibernateDemo1-ejb/src/java/cz/frantovo/hibernateDemo1/CilDAOBean.java Sat Mar 14 22:22:46 2009 +0100
1.3 @@ -3,6 +3,8 @@
1.4 import cz.frantovo.hibernateDemo1.dto.Cil;
1.5 import java.util.Collection;
1.6 import javax.ejb.Stateless;
1.7 +import javax.persistence.EntityManager;
1.8 +import javax.persistence.PersistenceContext;
1.9
1.10 /**
1.11 *
1.12 @@ -10,10 +12,13 @@
1.13 */
1.14 @Stateless
1.15 public class CilDAOBean implements CilDAORemote {
1.16 +
1.17 + public static final String PU = "HibernateDemo1-PU";
1.18 +
1.19 + @PersistenceContext(unitName = PU)
1.20 + private EntityManager em;
1.21
1.22 public Collection<Cil> getCile() {
1.23 throw new UnsupportedOperationException("Not supported yet.");
1.24 }
1.25 -
1.26 -
1.27 }