Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-1768

Allow configuration of ActiveMQConfiguration in ActiveMQComponent with Spring

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.1.0
    • 5.2.0
    • None
    • None
    • JDK5, Windows XP, Camel 1.4-SNAPSHOT

    • Patch Available

    Description

      Because ActiveMQComponent overwrites the getConfiguration() of JmsComponent and declares the return value of type ActiveMQConfiguration instead of JmsConfiguration the configuration via xml fails.

      Therefore the following configuration is not valid.

       
      <bean id="jmsConfig" class="org.apache.activemq.camel.component.ActiveMQConfiguration">
        <property name="connectionFactory" ref="jmsConnectionFactory"/>
        <property name="concurrentConsumers" value="1"/>
        <property name="exceptionListener" ref="jmsExceptionListener" />
      </bean>
      
      <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" destroy-method="stop" >
        <property name="connectionFactory" ref="jmsConnectionFactory" />
        <property name="taskExecutor" ref="myTaskExecutor" />
        <property name="usePooledConnection" value="true" />
        <property name="configuration" ref="jmsConfig"/>
      </bean>
      

      The patch shows the changes that are necessary to allow this.

      Attachments

        Activity

          People

            rajdavies Robert Davies
            akuhtz Andreas Kuhtz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: