im not a Spring guy so i didnt got the ideia behind that bean configuration, could you explain what kind of use case you want to achive with that?
If I understand, you would like to have a configurable injectable Map, which would map CreditCardTypeEnum to some handler bean.
The proper way to do this in CDI is to create a producer method, but you would need to implement your own way of reading a configuration file, if you really need the mapping to be configurable through a conf file. Check if DeltaSpike has any extensions that would allow you to do this through xml only.
@Rafael - Marko got it, I needed to have a configurable injectible Map, which doesn't seem trivial in weld. I'll read up on the 'producer method' again.
Also, I'd prefer not to use a config file, is that possible?
1 of 1 people found this helpful
I almost got the idea
can i call this a configurable injectable map? https://github.com/rmpestano/serverfaces/blob/master/serverfaces-common/src/main/java/org/serverfaces/common/OIDProvider.java
maybe it can help.
Thank you Rafael! That looks amazing.