SwitchYard application as a JBoss module does not work
- We are trying to implement a complex scenario where we want to have a SwitchYard project with common behaviour installed as a module in JBoss and then just instantiate its services when needed.
- We know that CDI could be performed from one SwitchYard project to another deployment package. However we are experiencing some troubles with multiple CDI injection. For our solution to work we need to have more than one injection taking place in the same bean invocation.
- The problem is as follows:
- We have a SwitchYard project (module) which is installed in JBoss as a module.
- Then we have another SwitchYard project (consumer) that is depending on this module (as can be seen in
- In the
ConsumerServiceBeanwe inject the
CommonService1service (that is defined in the module project). This injection seems to work fine as the message
"EXECUTING"which is being logged in the
CommonService1Beanis printed into the log.
CommonService1Beanhas another injection of the
CommonService2service. The problem here is that the second injection is not happening and the injected reference is always
- If we however were to inject the
CommonService2service directly in the
ConsumerServiceBeanthe processing message (being logged by this service) prints out just fine.
- Red Hat JBoss Fuse Service Works (FSW)
- Red Hat JBoss Fuse (Fuse)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.