If a CDI bean references another CDI bean, then CDI will automatically wire those together.
Is this mean that i should not put my @named PageBean in switchyard.xml if i already have put in switchyard.xml other bean (like RegistrationPageBean) ?
1 of 1 people found this helpful
It's really up to you if you want to define this interaction in switchyard.xml. As I mentioned in an earlier post, Injection between two CDI beans happens whether SwitchYard is involved or not. Possible reason why you might want to include the definition in switchyard.xml anyway:
1) You want to document the relationship between service components in your application model.
2) You anticipate that the relationship may change at some point in the future. For example, if the consumer CDI bean needs to switch to a provider different than another CDI Bean (e.g. a remote web service).