Bom dia pessoal estou utilizando o cdi no meu projeto jsf, estou colocando as configurações mais o mesmo sempre retorna null:
beans.xml
<beans>
</beans>
context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource name="BeanManager"
auth="Container"
type="javax.enterprise.inject.spi.BeanManager"
factory="org.jboss.weld.resources.ManagerObjectFactory"/>
</Context>
JobInserirProjetosRun.java(classe que injeta o bean)
package fe.br.pe.releasemanager.job;
import java.util.Date;
import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SimpleScheduleBuilder;
import org.quartz.Trigger;
import org.quartz.TriggerBuilder;
import org.quartz.impl.StdSchedulerFactory;
public class JobInserirProjetosRun {
public void runJobInserirProjeto() {
try {
JobDetail j = JobBuilder.newJob(JobInserirProjetos.class).build();
Trigger t = TriggerBuilder.newTrigger().withIdentity("CroneTrigger").
withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInMinutes(1)
.repeatForever()).build();
Scheduler s = StdSchedulerFactory.getDefaultScheduler();
s.start();
s.scheduleJob(j, t);
}catch (SchedulerException e) {
e.printStackTrace();
}
}
}