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

Future.cancel(true) should interrup the thread if the acync method is associated with a thread #73

Open glassfishrobot opened 11 years ago

glassfishrobot commented 11 years ago

See http://java.net/projects/ejb-spec/lists/jsr345-experts/archive/2012-09/message/7 and the follow-up discussion

Affected Versions

[3.2]

glassfishrobot commented 11 years ago

Reported by mvatkina

glassfishrobot commented 11 years ago

wolfc said: This constitutes a non-backwards compatible change.

It must be accompanied by a feature to opt-into this feature, for example:

@Asynchronous(interruptable=true)

Note that we are talking about an EJB invocation, not a POJO invocation here. So really the semantics of j.u.l.Future are not applicable.

glassfishrobot commented 11 years ago

mvatkina said:

semantics of j.u.l.Future are not applicable

Can you provide more details?

The proposal is for the EJB container to mark the thread as interrupted, not stop the thread in any way.

And we are saying that an EJB is a POJO in 3.x so using Future.cancel(boolean mayInterruptIfRunning) is IMHO the way to request the interruption - see e.g. http://java.net/projects/ejb-spec/lists/users/archive/2012-10/message/9

glassfishrobot commented 11 years ago

mvatkina said: Not enough support

glassfishrobot commented 11 years ago

mvatkina said: See http://java.net/projects/ejb-spec/lists/jsr345-experts/archive/2013-03/message/47

glassfishrobot commented 11 years ago

Was assigned to mvatkina

glassfishrobot commented 7 years ago

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