updates the code to use the getBeanManager

Remove the deprecated method and update to getBeanManager