[jboss-user] [EJB 3.0] - Re: removalTimeoutInSeconds & subsequent removal?

Protuhj do-not-reply at jboss.com
Wed Mar 11 11:31:53 EDT 2009


So I think I have a solution that works, but it seems like a hack. I have to set my idle timeout to less than the removal timeout, which is not what I wanted to do. I wanted it to just remove my bean as soon as it hit became idle.

But since when you hit removalTimeoutSeconds it doesn't actually do any cleanup of the memory (it just removes the data from the disk cache), setting the idleTimeout higher than the removalTimeout per the wiki doesn't work. 

Something definitely seems broken with the way this is implemented in JBOSS AS 4.2.3, I don't know if it is any different in 5.0, I assume not.

This is the way I want it to work:

Client gets bean
bean connects the socket
client crashes (in our setup, this may happen, you never know)
bean times out (removalTimeoutSeconds not idle)
some annotated function gets called (@Remove or @PreDestroy this doesnt happen right now)
my socket is closed properly since the function was called
the other end of the socket gets the closure notice

this is what happens:
client gets bean
bean connects the socket
client crashes
bean times out (removalTimeoutSeconds)
no function of mine gets called
<nothing until...> i redeploy the EJB and then the preDestroy on the bean gets called..

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217007#4217007

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217007



More information about the jboss-user mailing list