I ran into the same problem.  The networkConnectors need to be first in the
XML declaration.

  <amq:broker brokerName="BrokerA" useJmx="true" persistent="true">
        <amq:networkConnectors>
                <amq:networkConnector uri="static:(tcp://hostname:61616)"
dynamicOnly="false" conduitSubscriptions="false" networkTTL="5"/>
        </amq:networkConnectors>
        <amq:persistenceAdapter>
                <amq:amqPersistenceAdapter
directory="/var/cache/tomcat5/work/activemq-data" maxFileLength="10485760"/>
        </amq:persistenceAdapter>
        <amq:transportConnectors>
                <amq:transportConnector uri="tcp://localhost:61616"/>
        </amq:transportConnectors>
  </amq:broker>


Michal Singer wrote:
> 
> Hi. I am trying to raise an embedded Active MQ broker using spring
> configuration file. I work with spring 2.0.6 & Active MQ 5.0.0. The only
> way that works is this:
>  <amq:broker brokerName="brokerFactory" useJmx="true" persistent="true">
>    <amq:managementContext>
>         <amq:managementContext connectorPort="1099"
> jmxDomainName="org.apache.activemq"/>
>     </amq:managementContext>
>     <amq:transportConnectors>
>       <amq:transportConnector name="openwire" uri="tcp://localhost:61616"
> />
>     </amq:transportConnectors>
>   </amq:broker>
> 
> With this way i have a few problems:
> 1. how do i define the active mq configuration file. i can't see any way?
> 2. I am trying to define: amq:networkConnectors but I get the following
> error - 
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was
> found starting with element 'amq:networkConnectors'. One of
> '{WC[##other:"http://activemq.org/config/1.0"]}' is expected.
> 
> I use the following namespace and according to the documentation this
> element should work:
> http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://activemq.org/config/1.0 
> http://activemq.apache.org/snapshot-schema/activemq-core-5.0-SNAPSHOT.xsd
> 
> Any help would be highly appreciated.
> Thanks
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Active-MQ-broker-embedded-with-spring-configuration-problems-tp15253117s2354p15268990.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to