changed caching approach whole ConnectionSemaphore saved in MetaData and
added close connection support for application removal from deployment