The problem is that JNDI throws a CommunicationException when such scenario happens, and that a CommunicationException can be trown for many real and good reasons (like a network breakdown between client and server, or whatever). I'll submit this as a JNDI bug, thank you !