activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ffrenchm <>
Subject Re: embedding ActiveMQ thanks activemq.xml without starting
Date Tue, 07 Apr 2009 12:10:43 GMT


the content of my xml file :

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
<!-- START SNIPPET: example -->

    <!-- Allows us to use system properties as variables in this
configuration file -->
         <property name="locations">

    <broker xmlns="" brokerName="Test"

        <!-- Destination specific policies using destination names or
wildcards -->
                    <policyEntry queue=">" memoryLimit="5mb"/>
                    <policyEntry topic=">" memoryLimit="5mb">
                      <!-- you can add other policies too such as these

        <!-- Use the following to configure how ActiveMQ is exposed in JMX
            <managementContext createConnector="false"/>

        <!-- The store and forward broker networks ActiveMQ will listen to
            <!-- by default just auto discover the other brokers -->
            <networkConnector name="default-nc" uri="multicast://default"/>
            <!-- Example of a static configuration:
            <networkConnector name="host1 and host2"

            <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" maxFileLength="20 mb"/>

        <!-- Use the following if you wish to configure the journal with
JDBC -->
            <journaledJDBC dataDirectory="${activemq.base}/data"

        <!-- Or if you want to use pure JDBC without a journal -->
            <jdbcPersistenceAdapter dataSource="#postgres-ds"/>

            <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
        <!--  The maximum about of space the broker will use before slowing
down producers -->
                    <memoryUsage limit="20 mb"/>
                    <storeUsage limit="1 gb" name="foo"/>
                    <tempUsage limit="100 mb"/>

        <!-- The transport connectors ActiveMQ will listen to -->
            <transportConnector name="openwire" uri="tcp://localhost:61616"
            <transportConnector name="ssl" uri="ssl://localhost:61617"/>

<!-- END SNIPPET: example -->

I decided to embed activemq by setting the configuration through internal
API. But maybe should I throw a JIRA for this issue ?

Gary Tully wrote:
> that seems unintended, what is the contents of you xml configuration file?
> There are some alternatives that may help: see:
> 2009/4/6 ffrenchm <>
>> Hello,
>> I'm trying to embed ActiveMQ thanks this method call:
>> broker = BrokerFactory.createBroker(new URI("xbean:file:"+conffile_),
>> false);
>> As far I can understand by setting the boolean startBroker to false it
>> should not start the broker until I expressly implement the
>> broker.start()
>> method but in fact it did (broker.isStarted() return true)...
>> Do I misunderstand or is this a unattended behavior ?
>> Thanks
>> --
>> View this message in context:
>> Sent from the ActiveMQ - User mailing list archive at
> -- 
> Open Source SOA

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message