JBoss Community

Re: Cancelling an @Asynchronous method with Future.cancel

created by david_b in EJB3 - View the full discussion

If anyone else encounters this problem, I've found a way around it using JMS.

 

My session bean creates a temporary queue, then sends an "acknowledge" type message to the caller via JMS with the replyTo address set to the temporary queue. The caller can send a "cancel" message to the temporary queue, which the bean checks periodically during processing.

 

It's much more complex but it works on AS 6.0.0. When cancelling an asynchronous call is supported I will switch to the simpler option.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community