bind entitymanager to local thread variable