Refactoring: Use BeanFactory to load bean.

Use the sugarcrm BeanFactory class to load the bean.