View Javadoc
1   package ejava.examples.cdiconfig.ejb;
2   
3   import javax.ejb.Remote;
4   import javax.ejb.Stateless;
5   import javax.inject.Inject;
6   
7   import ejava.examples.cdiconfig.bo.Project;
8   import ejava.examples.cdiconfig.dao.ProjectsDao;
9   
10  @Stateless
11  @Remote(ProjectsMgmtRemote.class)
12  public class ProjectsMgmtEJB implements ProjectsMgmtRemote {
13      @Inject
14      private ProjectsDao projectsDao;
15      
16      @Override
17      public int createProject(Project task) {
18          projectsDao.create(task);
19          return task.getId();
20      }
21  }