Hi,
I 'm experimenting with CDI in TomEE 1.6 as an alternative to Spring DI. In spring I can setup a custom data source bean like this:
<bean name="dataSource" class="my.custom.DBDataSource">
<constructor-arg index="0" name="arg1" value="val1" />
<constructor-arg index="0" name="arg2" value="val2" />
</bean>
What is the CDI equivalent way of doing it? Use a factory with @Produces or a custom annotation with params? I want to be able to @Inject the data source at other places in the code, run unit tests via JUnit etc.