Make the necessary changes to support annotation based injection between components

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:

@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.

is duplicated by

is related to

Activity

Show:

Details

Priority

Components

Assignee

Reporter

Labels

Created May 14, 2012 at 7:13 PM
Updated April 25, 2018 at 3:33 PM