1 Reply Latest reply on Oct 7, 2015 4:45 AM by Bjørn Hilstad

    Injection of JMSContext requires subsystem messaging even without use of hornetq

    Bjørn Hilstad Newbie

      I am testing Wildfly 9 with IBM MQ 8 and have configured subsystem "resource-adapters" with connections to MQ.

      But to be able to get injection of a JMSContext to work I also have to add configuration for subsystem "messaging" even though it is not directly used.

      Without subsystem "messaging" the injection fails with a message like this "WELD-001408: Unsatisfied dependencies for type JMSContext with qualifiers @Default".

      The injection specifices a specific connectionfactory defined in subsystem "resource-adapters". Without subsystem "messaging"  it works as expected (it uses a working connection to IBM MQ), but without it fails during startup of the application.


      The injection looks like this:





      Should the injection of JMSContext require the inclusion of an unused subsystem? I assume that subsystem "messaging" must be there because it defines a default connectionfactory as required by the JMS 2.0 spec. Would it be possible to work around this by somehow defining the default connectionfactory as part of subsystem "resource-adapters"?