root / middleware / src / com / gonnatrak / middleware / ejb / AbstractWorkerBean.java @ 1

View | Annotate | Download

1
/**
2
 * Created by Andrey Khalzov
3
 * 13.07.2008 0:25:39
4
 */
5
package com.gonnatrak.middleware.ejb;
6
7
import com.gonnatrak.middleware.util.DAO;
8
9
import javax.annotation.PostConstruct;
10
import javax.persistence.EntityManager;
11
import javax.persistence.PersistenceContext;
12
13
public class AbstractWorkerBean {
14
    public static final String JNDI_PREFIX = "gonnatrak/";
15
16
    @PersistenceContext(unitName = "gonnatrak/persistence")
17
    protected EntityManager em;
18
19
    protected DAO dao;
20
21
    @PostConstruct
22
    public void initDao() {
23
        dao = new DAO(em);
24
    }
25
}