JBoss Community

@Asynchronous invocation retain session context

created by Nacho Estrada in EJB3 - View the full discussion

Hello,

I have this situation. A client is invoking several asynchronous stateless session bean methods returning a AsyncResult.

The client wait for 30 secs for a response and after this calls cancel method of the Future object.

Ok cancel it's not woking. It doen't matter becouse i don't mind about cancelling the executions of the asynchronous methods.

 

The problem is that the container keeps the reference to all the SessionBeans that haven't been consumed calling Future.get() causing some out of memory problems after some hours.

 

What i should do to avoid this? I'm planning to wait in another thread after 30 secs to the rest of the results.

 

Is there any way of specifing a Timeout to Asynchronous methods?

 

Thanks in advance,

Nacho.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community