Note: The similar question has been already asked three years ago, in time of EE 6, see how to instantiate more then one CDI/Weld bean for one class? Has something changed in EE 7?
In Spring there is possible to instantiate any class by defining the corresponding bean in xml conf. It is also possible to instantiate more beans for one class with different parameters.....
Is it possible to do it in CDI, I mean to create an instance without creating another class?
Spring Example:
<bean id="foo" class="MyBean">
<property name="someProperty" value="42"/>
</bean>
<bean id="hoo" class="MyBean">
<property name="someProperty" value="666"/>
</bean>