Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-22557

[GSS](7.4.z) WFLY-15372 Remove the use of TimerHandle in ejb timer management operations

XMLWordPrintable

      the spec states that:

      The javax.ejb.TimerHandle interface allows the caller to obtain a serializable timer handle that may be persisted. Timer handles are only available for persistent timers. Since timers are local objects, a TimerHandle must not be passed through a bean’s remote business interface, remote interface or web service interface.

      Since the TimerHandle interface extends java.io.Serializable, a client may serialize the handle. The serialized handle may be used later to obtain a reference to the timer identified by the han- dle. A TimerHandle is intended to be storable in persistent storage.
      A TimerHandle must not be passed as an argument or result of an enterprise bean’s remote business interface, remote interface, or web service method.

       

      WildFly ejb timer management operations creates new TimerHandle instances in order to obtain the associated timers. This is not the intended usage of TimerHandle and is not necessary. We should be able to perform the same operations with timer id and timed object id.

      removes the timerHandle field from TimerImpl class and modifies its getHandle() method to return a new instance of TimerHandleImpl for every call, since it's not worthwhile to save it as an instance variable. In most cases, application calls getHandle() method once or none at all.

            mshikalw Moulali Shikalwadi
            cfang@redhat.com Cheng Fang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: