_lock.lock();
if (!_sessionListenerAdded)
{
if (ctx.getPipeline().getContext(ClientSessionFilter.class) != null)
{
ClientSessionFilter sessionHandler = (ClientSessionFilter) ctx.getPipeline().getContext(ClientSessionFilter.class).getHandler();
sessionHandler.addSessionClosedListener(new Runnable()
{
public void run()
{
_lock.lock();
invalidateProxies();
_openCalls.clear();
_pendingCalls.clear();
_lock.unlock();
if (_closedSessionListener != null)
try
{
_closedSessionListener.run();
}
catch (Throwable ex)
{
Constants.ahessianLogger.warn("", ex);
}
}
});
sessionHandler.addSessionNewListener(new Runnable()
{
public void run()
{
if (_newSessionListener != null)
try