activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <norman.mau...@googlemail.com>
Subject Re: Spring + Camel + external ActiveMQ
Date Tue, 02 Mar 2010 09:13:21 GMT
Hi,

if you want to use activemq in not embed mode you would have something
like this in the spring xml:

    <bean id="jmsConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory"
destroy-method="stop">
      <property name="connectionFactory">
        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
          <property name="brokerURL">
            <value>tcp://192.168.0.200:61616?broker.useJmx=false</value>
          </property>
        </bean>
      </property>
    </bean>

Note the tcp:// as replacement of the vm://.

Hope it helps,

Bye,
Norman


2010/3/2 juhasiltanen <juhasiltanen@gmail.com>:
>
> Hi,
>
> As the subject suggests, I would like to configure a Spring-based
> application using Apache Camel for routing with an ActiveMQ instance that is
> running outside my application (as a standalone).
>
> There are many samples on how to use ActiveMQ in embedded mode, but how to
> use it in "external mode" or "standalone mode"?
>
> I've tried commenting configurations out to have an error displayed in the
> application log saying something like "ActiveMQ broker not detected, abandon
> ship!", so that I would know, that my application is depending on the
> external ActiveMQ instance.
>
> This is the only ActiveMQ configuration left in my spring configuration
> file:
>
> <bean id="amqConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                <property name="brokerURL"
> value="vm://localhost:616161?broker.persistent=false&amp;broker.useJmx=false"
> />
>        </bean>
>
> Is the embedded-mode enabled by including some jar files (do I have to
> remove something)? Here are a few library files that assumably play a key
> role: activemq-camel-5.2.0.jar, activemq-core-5.2.0.jar,
> activemq-pool-5.2.0.jar.
>
> --
> View this message in context: http://old.nabble.com/Spring-%2B-Camel-%2B-external-ActiveMQ-tp27753540p27753540.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Mime
View raw message