SwitchYard application as a JBoss module does not work
Issue
- 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
jboss-deployment-structure.xml
). - In the
ConsumerServiceBean
we inject theCommonService1
service (that is defined in the module project). This injection seems to work fine as the message"EXECUTING"
which is being logged in theCommonService1Bean
is printed into the log. - However
CommonService1Bean
has another injection of theCommonService2
service. The problem here is that the second injection is not happening and the injected reference is alwaysnull
. - If we however were to inject the
CommonService2
service directly in theConsumerServiceBean
the processing message (being logged by this service) prints out just fine.
Environment
- Red Hat JBoss Fuse Service Works (FSW)
- 6.0
- Red Hat JBoss Fuse (Fuse)
- 6.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.