activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: Active MQ broker is created even without config
Date Thu, 14 Feb 2013 02:08:45 GMT
That is correct. ActiveMQ will try to connect to a running broker already
in the JVM by the name of "localhost" in your case. If it does not find
one, it will create one. If you want the other app to create in in-JVM
broker with the VM connector with the same name, then that app needs to run
first. If you're just going to use in-memory brokers via the vm://
transport, then you don't need to have a separate configuration to start
the broker. just have all apps reference the same connection url, eg, vm://
But if you need to tweak some of the settings. Have a look here, a lot of
this is explained:

http://activemq.apache.org/vm-transport-reference.html




On Wed, Feb 13, 2013 at 5:36 PM, newUser06 <bhuvanalakshmikn@gmail.com>wrote:

> Hi
>
> I have commented the broker configurations from application-context.xml but
> broker is created automatically. My app-context file has bean to create
> connection to the broker. I want the broker to be created by another
> application but that one fails because my first application already creates
> the broker. How do i avoid this scenario ? Can you please clarify ?
>
>
>
>
>
>         <bean id="springJmsFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory"
>                 destroy-method="stop">
>                 <property name="connectionFactory">
>                         <bean
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                                 <property name="brokerURL"
> value="vm://localhost" />
>                                 <property name="sendTimeout"
> value="300000" />
>                                 <property name="prefetchPolicy">
>                                         <bean
> class="org.apache.activemq.ActiveMQPrefetchPolicy">
>                                                 <property
> name="topicPrefetch" value="100"/>
>                                         </bean>
>                                 </property>
>                         </bean>
>                 </property>
>         </bean>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Active-MQ-broker-is-created-even-without-config-tp4663390.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message