bug fixes for JPAManager and added setting ConnectionSemaphore in
MetaData at initialization time