Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2217

mq-fabric exposes ActiveMQConnecionFactory in OSGi Service Registry only under its class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Minor Minor
    • None
    • JBoss A-MQ 6.3
    • fabric8
    • Hide

      The workaround is to import the service via its class name as opposed to interface name, which requires additional, non-standard and not very known configuration

      <reference xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" id="amqFactory"
        interface="org.apache.activemq.ActiveMQConnectionFactory"
        availability="mandatory" ext:proxy-method='classes' />
      
      Show
      The workaround is to import the service via its class name as opposed to interface name, which requires additional, non-standard and not very known configuration <reference xmlns:ext = "http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" id= "amqFactory" interface= "org.apache.activemq.ActiveMQConnectionFactory" availability= "mandatory" ext:proxy-method= 'classes' />

      The mq-fabric bundle by default exposes an ActiveMQConnectionFactory into the OSGi service registry. Other messaging applications can easily import this connection factory and use it.

      The standard Blueprint service import for a JMS ConnectionFactory looks like

      <reference id="amqFactory" interface="javax.jms.ConnectionFactory" availability="mandatory"/> 
      

      But the code at
      https://github.com/jboss-fuse/fabric8/blob/1.2.0.redhat-6-3-x/mq/mq-fabric/src/main/java/io/fabric8/mq/fabric/cf/ActiveMQConnectionFactoryService.java#L32

      uses

      @Service(ActiveMQConnectionFactory.class)
      @Component(name = "io.fabric8.mq.fabric.cf", label = "Fabric8 ActiveMQ Connection Factory Service", immediate = true, configurationFactory = true, metatype = true)
      public class ActiveMQConnectionFactoryService extends ActiveMQConnectionFactory {
      

      and exposes this ConnectionFactory instance only under its actual class but not under its interface in the OSGi Service Registry.

      As a result the blueprint based service import does not satisfy and times out.

            Unassigned Unassigned
            rhn-support-tmielke Torsten Mielke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: