title: Configuring Quartz job to call EJb with EJBInvokerJob
body: <p>I need to call an ejb method from a quartz job an I'm having trouble with locating the ejb job. I have defined a Local interface and an stateless implementation. When deploying on websphere 7, the EjbInvokerJob is unable to find my component in my jndi tree.
  This is my quartz job definition (this is loaded via the quartz init servlet)</p>
  
  <pre><code>JobDetail jd = JobBuilder//
                      .newJob(EJBInvokerJob.class)//
                      .withIdentity("job", "group")//
                      .usingJobData(EJBInvokerJob.EJB_JNDI_NAME_KEY, "ejb/myBean")//
                      .usingJobData(EJBInvokerJob.EJB_METHOD_KEY, "update")//
                      .build();
              String cronExpr = getInitParameter("cronExpr");
              Trigger cronTrigger = TriggerBuilder//
                      .newTrigger() //
                      .forJob(jd) //
                      .startNow() //
                      .withSchedule(CronScheduleBuilder.cronSchedule(cronExpr))//
                      .build();
  
              Scheduler sched = StdSchedulerFactory.getDefaultScheduler();
              sched.scheduleJob(jd, cronTrigger);
              sched.start();
  </code></pre>
  
  <p>And my bean has this annotation on top of it</p>
  
  <pre><code>@Stateless(name = "myBean")
  </code></pre>
  
  <p>How should I bind my EJB_JNDI_NAME_KEY? in websphere or should I be able to do this via this configuration. I think the problem is with my lack of jndi tree knowledge. Since the servlet which starts the job runs in the same jvm, so a local interface should be enough</p>