If memory is running short so that handleCallback calls persistCallback (applies to pull-style callbacks - e.g. when connect via http), a NullPointerException can result in persistCallback if the client simultaneously disconnects causing destroy() to be called setting callbackStore to null.
Can easily reproduce this behaviour by stopping the callback thread in the debugger as the client is disconnected (or abruptly killed).
Changing persistCallback to:
private synchronized void persistCallback(InvocationRequest callback) throws IOException { if (callbackStore != null){ callbackStore.add(callback); } }
Thanks, again. I'll look into it. -Ron