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.CdiDemo;
8 import ejava.examples.cdiconfig.bo.Job;
9 import ejava.examples.cdiconfig.dao.JobsDao;
10
11 @Stateless
12 @Remote(JobsMgmtRemote.class)
13 public class JobsMgmtEJB implements JobsMgmtRemote {
14 @Inject @CdiDemo
15 private JobsDao jobDao;
16
17 @Override
18 public int createJob(Job job) {
19 jobDao.create(job);
20 return job.getId();
21 }
22 }