我正在尝试在自定义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
答案 0 :(得分:0)
只是管理它以使用一些反射和ServiceLocator。