我正在尝试在InterruptableJob#execute
带有 custom 的石英方法中使用 EJB ServiceLocator
,但是出现以下异常:
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