I have a stateful EJB with a transactional @Asynchronous
method returning Future<T>
. It's being called from web-tier (@SessionScoped
CDI bean) as shown below:
@SessionScoped
@Named
public class SessionBean {
@EJB
EjbService service
public void call() {
Future<Object> response = service.process();
}
}
@Stateful
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class EjbService {
@Asynchronous
public Future<Object> process() {
//
}
}
The question is what happens to the transaction if a user terminates the web session during the execution of this asynchronous call?