在Quartz JOB中找到EJB

时间:2012-12-17 17:10:21

标签: ejb quartz-scheduler

我正在尝试在自定义InterruptableJob#execute的石英ServiceLocator方法中使用EJB,但是,我得到以下异常:

org.quartz.JobExecutionException: java.lang.ClassCastException: Cannot cast $Proxy450 to com.test.service.TestService [See nested exception: java.lang.ClassCastException: Cannot cast $Proxy450 to com.test.service.TestService]
    at com.test.job.TestJob.execute(TestJob.java:107) [ecm-ejb.jar:]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:203) [quartz-1.5.2.jar:1.5.2]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) [quartz-1.5.2.jar:1.5.2]

我能做些什么让EJB和Quartz一起玩?

容器:JBoss AS 7.1

1 个答案:

答案 0 :(得分:0)

只是管理它以使用一些反射和ServiceLocator。