activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rattaman <zbyszek.ma...@gmail.com>
Subject Split ActiveMQ broker configuration into multiple files.
Date Tue, 03 Feb 2015 17:47:43 GMT
Hello,
I want to split configuration of the ActiveMQ Broker into two files. The
first one will contain the general configuration of the broker and the other
one will contain a list of predefined virtual destinations. We want to
generate those queues automaticaly based on some external data and so we
don't want to put it in the same file as the broker configuration.

Here is a general idea with queues instead of virtual destinations.

File 1: activemq.xml
<beans ...>
  <broker ...>

  </broker>
</beans>

File 2: queues.xml
<beans ...>
  <broker ...>
    <destinations>
      <queue physicalName="q1"/>
    </destinations>
  </broker>
</beans>

I tried to use:

Spring import:
<import resource="queues.xml"/>

but got

ERROR: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#1'
defined in class path resource [queues.xml]: Invocation of init method
failed; nested exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:type=Broker,brokerName=localhost
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService#1' defined in class
path resource [queues.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:type=Broker,brokerName=localhost

which is kind of what one could expect.

I also tried to use XInclude but my parser doesn't support this, and DTD
entity, but you can't use it together with XSD.

Any ideas? 

Best regards
Zbigniew Malec



--
View this message in context: http://activemq.2283324.n4.nabble.com/Split-ActiveMQ-broker-configuration-into-multiple-files-tp4690947.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message