0 Replies Latest reply on Dec 13, 2006 5:31 AM by Haohua xie

    <timeout-method> in ejb-jar.xml is supported in ebj3 RC9?

    Haohua xie Newbie

      I wrote a stateless session bean with timeservice. i don't want to use annonation @Timeout, so how can i define some timeout method in ejb-jar.xml?
      i followed the ejb3 core specification and some examples in Mastering Enterprise JavaBeans? 3.0.
      i added the following lines for the SLSB in ejb-jar.xml

      the timeout method defined in my SLSB(without @Timeout annotation) :
      public void ejbTimeout(Timer timer) {

      the deployments runs fine, and i successfully create a timer for the SLSB
      but after a little while when the timeout method should be called, i receive an EJBException in console:

      javax.ejb.EJBException: No method has been annotated with @Timeout

      if i add @Timeout for the ejbTimeout(Timer timer) or make my Stateless Session Bean class implement javax.ejb.TimedObject , the EJBException disappears, ejbTimeout(Timer timer) is called and everything is ok.

      My Environments JBoss 4.0.5.G.A JBoss EJB3 RC9
      I want to know wether there is anything wrong for my code or ejb-jar.xml or just current ejb3 implementation does not support <timeout-method> now.