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
ConsumerServiceBeanwe inject theCommonService1service (that is defined in the module project). This injection seems to work fine as the message"EXECUTING"which is being logged in theCommonService1Beanis printed into the log. - However
CommonService1Beanhas another injection of theCommonService2service. The problem here is that the second injection is not happening and the injected reference is alwaysnull. - If we however were to inject the
CommonService2service directly in theConsumerServiceBeanthe 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
