DOL-98 : code registering attribute for different listener is moved to method registerAttribute().