javaee / ejb-spec

See javax.ejb project for API. Contains legacy issues only.
https://github.com/javaee/javax.ejb
6 stars 1 forks source link

Clarify rules on use of Timer and TimerHandle #72

Closed glassfishrobot closed 11 years ago

glassfishrobot commented 11 years ago

Current spec

13.2.6The Timer and TimerHandle Interfaces

The javax.ejb.TimerHandle interface allows the Bean Provider to ...

Q: Does the Bean Provider match the bean that owns the timer?

13.4.1TimerService, Timer, and TimerHandle Interfaces

Timer instances must not be serializable.

The above doesn't prohibit passing it through a local business or local component interface (or a no-interface view). Q: Can it be passed to a Web component?

Affected Versions

[3.2]

glassfishrobot commented 11 years ago

Reported by mvatkina

glassfishrobot commented 11 years ago

mvatkina said: Changes in addition to those listed in #71:

p. 340: " If the bean invokes a any method is invoked on the timer after the termination of the timeout callback method, a NoSuchObjectLocalException must be thrown"

"If the bean invokes a any method is invoked on the timer after it has been removed, the NoSuchObjectLocalException must be thrown."

p. 341: "The javax.ejb.Timer interface allows the Bean Provider to cancel a timer and to obtain information about the timer. The javax.ejb.TimerHandle interface allows the Bean Provider to obtain a serializable timer handle that may be persisted."

"The Bean Provider cannot rely on the == operator to compare timers for “object equality”. The Bean Provider must use the Timer.equals(Object obj) method. Timer instances must be compared using Timer.equals(Object obj) method. The == operator should not be used for “object equality” of the timers."

p. 342: "An enterprise bean A timer is typically cancels a timer cancelled within a transaction."

glassfishrobot commented 11 years ago

mvatkina said: Fixed in rev 23

glassfishrobot commented 11 years ago

Was assigned to mvatkina

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA EJB_SPEC-72

glassfishrobot commented 11 years ago

Marked as fixed on Friday, December 14th 2012, 4:37:16 pm