Make the necessary changes to support annotation based injection between components
GENERAL
TESTING
GENERAL
TESTING
Description
It is not currently possible to have annotation based declaration or injection of resources within Sakai components. They must be wired via the XML approach.
In contrast, webapps can easily take advantage of annotation based injection without any XML. For example, the following works perfectly for injecting already declared beans into a web app:
In discussions with DH and AZ, there are changes that need to be made so that the above annotations can work within component code. IMO we should move forward with this.
It is not currently possible to have annotation based declaration or injection of resources within Sakai components. They must be wired via the XML approach.
In contrast, webapps can easily take advantage of annotation based injection without any XML. For example, the following works perfectly for injecting already declared beans into a web app:
@Resource(name="org.sakaiproject.user.api.UserDirectoryService")
private UserDirectoryService userDirectoryService;
or:
@Autowired @Qualifier("org.sakaiproject.user.api.UserDirectoryService")
private UserDirectoryService userDirectoryService;
In discussions with DH and AZ, there are changes that need to be made so that the above annotations can work within component code. IMO we should move forward with this.