Open GoogleCodeExporter opened 9 years ago
I am all for CDI, but I disagree with the described implementation.
Especially the 'interface MagentoApiConfiguration', this is just a Map... A Map
with a @Qualifier will be more like it. But even then, I'm not sure if using
CDI for configuration purpose is a good idea.
Original comment by ceefour666@gmail.com
on 31 Oct 2011 at 2:15
So you'd prefere something like
@Qualifier
@Retention(RUNTIME)
@Target({FIELD, PARAMETER})
@interface MagjaConfig {}
with
@Inject
@MagjaConfig
String apiUser; ?
Actually the map was just added for showing the design principle. Standard
config impl could internally hold a Properties. But with using @Alternative the
developer could provide his/her implementation may be referencing is global
config impl or db backend
Original comment by laluz...@gmail.com
on 22 Jan 2012 at 4:35
or maybe a better way:
@Qualifier
@Retention(RUNTIME)
@Target({FIELD, PARAMETER})
@interface MagjaConfig {
String value();
}
Original comment by laluz...@gmail.com
on 22 Jan 2012 at 4:46
Original issue reported on code.google.com by
laluz...@gmail.com
on 22 Sep 2011 at 8:10