A way to find bean manager in AS 7

(cherry picked from commit 7fd9e5a15b0748c16103711ea074a7629ea25169)