1 Reply Latest reply on Oct 3, 2005 4:43 AM by Luc Feys

    EJB timer IllegalStateException

    Luc Feys Newbie

      Hello,

      I am experiencing erroneous behaviour in the use of the ejb.Timer objects on JBoss 4.0.3RC2.

      Whenever I call one of the Timer methods (like getInfo()) I get an exception

      java.lang.IllegalStateException: Cannot obtain inMethodFlag for: Timer.getInfo
      org.jboss.ejb.AllowedOperationsAssociation.assertAllowedIn(AllowedOperationsAssociation.java:119)
      org.jboss.ejb.txtimer.TimerImpl.assertAllowedOperation(TimerImpl.java:380)
      org.jboss.ejb.txtimer.TimerImpl.getInfo(TimerImpl.java:234)
      org.apache.jsp.manageCommctr_jsp._jspService(org.apache.jsp.manageCommctr_jsp:70)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


      This problem was discussed in the bug report EJBTHREE-171 and there it is stated that it was solved since 08/Jun/05 in EJB 3.0 Beta 1.

      Is this version of EJB 3 not yet included in JBoss 4.0.3RC2?
      What should I do to patch my JBoss installation?
      Will this be fixed in an upcoming stable release of JBoss?

      Note that I did not post this issue in the EJB 3 newsgroup since it's not really related to EJB 3. I am not using EJB 3, but 2.1, which is supposed to support ejb.Timer.


      Thanks a lot for any suggestions on resolving this issue.

      Luc Feys

        • 1. Re: EJB timer IllegalStateException
          Luc Feys Newbie

          Problem solved.
          I did not get any of those errors in my ejb-layer, but was passing the Timer object directly to my web-layer through the local ejb interface. I guess the Timer objects are restricted to the ejb-layer, so using them in the web-layer cause exactly that IllegalStateException. Actually seems very logic.

          On second thought I could fit everything I needed to know about my Timer in an object that I now return from getInfo() to my web-layer. Just as intended by the spec.

          I guess finding that bug report didn't make me look far enough in my own code. :-{

          Sorry to have bothered the group with this question.

          Cheers,

          Luc