public static BeanManager getBeanManager ( Object ctx ) { return ( BeanManager ) javax . portlet . PortletContext . class . cast ( ctx ) . getAttribute ( WeldServletLifecycle . BEAN_MANAGER_ATTRIBUTE_NAME ) ; }
Get bean manager from portlet context .