sven.loe [
http://community.jboss.org/people/sven.loe] created the discussion
"Quartz bean fails at deployment on JBoss 5.1"
To view the discussion, visit:
http://community.jboss.org/message/641906#641906
--------------------------------------------------------------
Hello,
I am trying to deploy a app on JBoss 5.1 Final. It has 2 MDBs that need to be called by
quartz according to crontab. At deployment time I get the following error message:
08:34:10,809 INFO [EJBContainer] STARTED EJB:
ch.mobi.evn.business.application.AttestationEventsTimerBean ejbName:
AttestationEventsTimerBean
08:34:10,872 ERROR [TimerImpl] Error invoking ejbTimeout
javax.ejb.EJBException: No method has been annotated with @Timeout
at org.jboss.ejb3.mdb.MessagingContainer.callTimeout(MessagingContainer.java:304)
at
org.jboss.as.ejb3.timerservice.TimedObjectInvokerBridge.callTimeout(TimedObjectInvokerBridge.java:44)
at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
08:34:10,872 ERROR [TimerImpl] Error invoking ejbTimeout
javax.ejb.EJBException: No method has been annotated with @Timeout
at org.jboss.ejb3.mdb.MessagingContainer.callTimeout(MessagingContainer.java:304)
at
org.jboss.as.ejb3.timerservice.TimedObjectInvokerBridge.callTimeout(TimedObjectInvokerBridge.java:44)
at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
08:34:10,872 ERROR [TimerImpl] Error invoking ejbTimeout
javax.ejb.EJBException: No method has been annotated with @Timeout
at org.jboss.ejb3.mdb.MessagingContainer.callTimeout(MessagingContainer.java:304)
at
org.jboss.as.ejb3.timerservice.TimedObjectInvokerBridge.callTimeout(TimedObjectInvokerBridge.java:44)
at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
The source of the Bean looks like that:
@MessageDriven(activationConfig =
{@ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "0
5 * ? * MON-FRI *")})
@ResourceAdapter("quartz-ra.rar")
public class AttestationEventsTimerBean implements Job {
private static final Logger logger =
Logger.getLogger(AttestationEventsTimerBean.class);
@Override
public void execute(JobExecutionContext jobExecutionContext) throws
JobExecutionException {
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
logger.info("Process attestations: "+formatter.format(new Date()));
try {
this.attestationService.processLocalAttestations();
}
catch (AttestationException e) {
logger.error("AttestationTimeout failed.", e);
}
}
private AttestationService attestationService;
@EJB
public void setAttesationService(AttestationService attestationService) {
this.attestationService = attestationService;
}
}
It is done like in the examples in the JBoss docs. If I delete the @ResourceAdapter
annotation I get an exception that MDB the messagetype is unknown. An MDB has no @Timeout
annotations so what is going on here? Has somebody an idea?
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/641906#641906]
Start a new discussion in EJB3 at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]