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

Protuhj do-not-reply at jboss.com
Tue Mar 10 21:06:28 EDT 2009


We have a case where we would like to use EJB3 SFSBs, and the bean I have written is basically a proxy to a socket client. This means that one of the class' members is a Socket.

We also have the case that we do not need to be able to recall the same session bean after the bean has been removed, so passivating the bean does not make sense in our case.

Because of this, I have made the removalTimeoutInSeconds less than the idleTimeout, so the bean is removed and not passivated. I have tested this out and it works fine, until...

If I close my client the wrong way (kill the task from task manager), the bean gets to the timeout when it should be removed. When I watch the JMX console to see what is going on, the numbers change like I expect them to, the passivated count is zero and the active count is zero. So it looks like the bean was removed properly. If I go look at my socket client that the bean made the connection to (the target of Socket::connect), it only shows that the connection was made, it doesn't show that the connection was broken, as one would expect when a Socket object is destroyed.

I have one of my bean's functions annotated with the @Remove tag, and if I close my EJB3 client the correct way, this function is called correctly. It only doesn't seem to get called when the bean is supposed to be removed.

If this is unclear, let me know, I really need some help on this one. Thank you.

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

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



More information about the jboss-user mailing list