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>anyCookThis will inject the ability to get an Scheduler when the qualifier is known at runtime.protected SchedulercookThis will inject an EJB based on an Annotation qualifierprotected Schedulercook2This will be looked up at runtime during the @PostConstructprivate DataSourcedsThis will inject a javax.sql.DataSourceprivate EntityManageremThis will inject a persistence context using a textual name qualifierprotected JPASchedulerDAOImpljpaSchedulerDAOImplThis will inject a DAO by class type(package private) StringmessageThis will inject a String based on an annotation qualifierprotected SchedulerDAOschedulerDAOThis 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 StringgetName()return the name of the beanvoidinit()protected voidsetSessionContext(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:Schedulerreturn the name of the bean
-
setSessionContext
protected void setSessionContext(SessionContext ctx)
- Specified by:
setSessionContextin classSchedulerBase
-
init
@PostConstruct public void init()
-
-