I just noticed any RuntimeException from ejb3 stateless session beans
are ignored, and not logged in server.log. For example,
@Stateless
public class HelloBean implements HelloRemote {
@PreDestroy
private void remove() {
System.out.println("about to remove the bean instance.");
throw new IllegalStateException();
}
After the ejb is undeployed, I can see the message "about to remove the
bean instance.", but no exceptions.
I understand the bean instance will be removed regardless of exceptions
in @PreDestroy. But I think it would be helpful to log a warning.
Otherwise, users will just assume everything inside @PreDestroy method
has run successfully.
--
Cheng