[jboss-user] [EJB3] - Quartz bean fails at deployment on JBoss 5.1

sven.loe do-not-reply at jboss.com
Fri Dec 16 03:10:56 EST 2011


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&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111216/7e69aa39/attachment.html 


More information about the jboss-user mailing list