added end notification code

queryContext will be super set of server conf. you need not check for server conf separately