Package ejava.examples.jndidemo.ejb
Class TrainSchedulerEJB
- java.lang.Object
-
- ejava.examples.jndidemo.ejb.SchedulerBase
-
- ejava.examples.jndidemo.ejb.TrainSchedulerEJB
-
- All Implemented Interfaces:
TrainSchedulerRemote
,Scheduler
public class TrainSchedulerEJB extends SchedulerBase implements TrainSchedulerRemote
-
-
Field Summary
Fields Modifier and Type Field Description protected Instance<Scheduler>
anyCook
This will inject the ability to get an Scheduler when the qualifier is known at runtime.protected Scheduler
cook
This will inject an EJB based on an Annotation qualifierprotected Scheduler
cook2
This will be looked up at runtime during the @PostConstructprivate DataSource
ds
This will inject a javax.sql.DataSourceprivate EntityManager
em
This will inject a persistence context using a textual name qualifierprotected JPASchedulerDAOImpl
jpaSchedulerDAOImpl
This will inject a DAO by class type(package private) String
message
This will inject a String based on an annotation qualifierprotected SchedulerDAO
schedulerDAO
This will inject a DAO by interface type-
Fields inherited from class ejava.examples.jndidemo.ejb.SchedulerBase
ctx, log
-
-
Constructor Summary
Constructors Constructor Description TrainSchedulerEJB()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
return the name of the beanvoid
init()
protected void
setSessionContext(SessionContext ctx)
-
Methods inherited from class ejava.examples.jndidemo.ejb.SchedulerBase
getCtxProperty, getEnv, getJndiProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ejava.examples.jndidemo.Scheduler
getCtxProperty, getEnv, getJndiProperty
-
-
-
-
Field Detail
-
em
@Inject private EntityManager em
This will inject a persistence context using a textual name qualifier
-
ds
@Inject private DataSource ds
This will inject a javax.sql.DataSource
-
schedulerDAO
@Inject protected SchedulerDAO schedulerDAO
This will inject a DAO by interface type
-
jpaSchedulerDAOImpl
@Inject protected JPASchedulerDAOImpl jpaSchedulerDAOImpl
This will inject a DAO by class type
-
anyCook
@Inject @Any protected Instance<Scheduler> anyCook
This will inject the ability to get an Scheduler when the qualifier is known at runtime.
-
cook2
protected Scheduler cook2
This will be looked up at runtime during the @PostConstruct
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:Scheduler
return the name of the bean
-
setSessionContext
protected void setSessionContext(SessionContext ctx)
- Specified by:
setSessionContext
in classSchedulerBase
-
init
@PostConstruct public void init()
-
-