public class EJBInvokerJob
extends java.lang.Object
implements org.quartz.Job
A Job that invokes a method on an EJB.
JobDataMap when it executes:
EJB_JNDI_NAME_KEY- the JNDI name (location) of the
EJB's home interface.EJB_METHOD_KEY- the name of the method to invoke on the
EJB.EJB_ARGS_KEY- an Object[] of the args to pass to the
method (optional, if left out, there are no arguments).EJB_ARG_TYPES_KEY- an Class[] of the types of the args to
pass to the method (optional, if left out, the types will be derived by
calling getClass() on each of the arguments).INITIAL_CONTEXT_FACTORY - the context factory used to
build the context.PROVIDER_URL - the name of the environment property
for specifying configuration information for the service provider to use.
The result of the EJB method invocation will be available to
Job/TriggerListeners via
.
JobExecutionContext.getResult()
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CREDENTIALS |
static java.lang.String |
EJB_ARG_TYPES_KEY |
static java.lang.String |
EJB_ARGS_KEY |
static java.lang.String |
EJB_JNDI_NAME_KEY |
static java.lang.String |
EJB_METHOD_KEY |
static java.lang.String |
INITIAL_CONTEXT_FACTORY |
static java.lang.String |
PRINCIPAL |
static java.lang.String |
PROVIDER_URL |
| Constructor and Description |
|---|
EJBInvokerJob() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(org.quartz.JobExecutionContext context) |
protected javax.naming.InitialContext |
getInitialContext(org.quartz.JobDataMap jobDataMap) |
public static final java.lang.String EJB_JNDI_NAME_KEY
public static final java.lang.String EJB_METHOD_KEY
public static final java.lang.String EJB_ARG_TYPES_KEY
public static final java.lang.String EJB_ARGS_KEY
public static final java.lang.String INITIAL_CONTEXT_FACTORY
public static final java.lang.String PROVIDER_URL
public static final java.lang.String PRINCIPAL
public static final java.lang.String CREDENTIALS
public void execute(org.quartz.JobExecutionContext context)
throws org.quartz.JobExecutionException
execute in interface org.quartz.Joborg.quartz.JobExecutionExceptionprotected javax.naming.InitialContext getInitialContext(org.quartz.JobDataMap jobDataMap)
throws javax.naming.NamingException
javax.naming.NamingException