Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12777

Stateful bean with @StatefulTimeout value -1 should not timeout or removed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 19.0.0.Beta1, 19.0.0.Final
    • 19.0.0.Beta1
    • EJB
    • None

      Stateful bean with @StatefulTimeout value -1 should not timeout or removed.
      A value of -1 means the bean will never be removed due to timeout. When running with the latest WildFly snapshot (2019-11-11), such a stateful bean was unexpectedly timed out and removed.

      @Stateful
      @StatefulTimeout(value = -1, unit=TimeUnit.DAYS)
      @AccessTimeout(value=StatefulTimeoutIF.TIMEOUT_DAYS, unit=TimeUnit.DAYS)
      @Local(StatefulTimeoutIF.class)
      public class Minus1TimeoutBean {
      
      ...
      
      }
      
      

      Or the stateful bean timeout can be configured with ejb-jar.xml:

      <session>
          <ejb-name>xx</ejb-name>
          <business-local>xx</business-local>
          <ejb-class>xx</ejb-class>
          <session-type>Stateful</session-type>
          <stateful-timeout>
            <timeout>-1</timeout>
            <unit>Days</unit>
          </stateful-timeout>
          <concurrency-management-type>Container</concurrency-management-type>
      </session>
      

              cfang@redhat.com Cheng Fang
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: