activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Two brokers when embedding in Jboss
Date Wed, 14 Mar 2007 15:58:58 GMT
On 3/11/07, Jan Arend Jansen <nonose@xs4all.nl> wrote:
>
> Hi,
>
> I've embedded activemq 4.1.0 into jboss 4.0.5 by using the RAR. I've
> modified the ra.xml to start an embedded broker. I use EJB3, like so:
>
> @MessageDriven(
>                 name="jms/EventListener",
>                 activationConfig =
>         {
>                 @ActivationConfigProperty(propertyName = "destinationType", propertyValue
> = "javax.jms.Topic"),
>                 @ActivationConfigProperty(propertyName = "Destination", propertyValue
=
> "topic.workflow_event"),
>                 @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue
> = "Auto-acknowledge"),
>                 @ActivationConfigProperty(propertyName = "subscriptionDurability",
> propertyValue = "NonDurable")
>         },
>         messageListenerInterface=MessageListener.class
> )
> @ResourceAdapter("activemq-rar-4.1.0-incubator.rar")
> public class EventListenerBean implements MessageListener
> {
>            public void onMessage(Message recvMsg)
>            {
>               System.out.println("----------------");
>               System.out.println("Received message");
>               System.out.println("----------------");
>            }
> }
>
> Whenever this bean is activated, a second broker (named 'localhost' seams to
> be started). The activemq 'list' tool gives the following result:
>
> ACTIVEMQ_HOME: D:\Java
> BrokerName = localhost
>
> BrokerName = embedded
>
> Although the configuration works, it bothers me that there are two brokers
> active instead of one....is this how it is supposed to be?

Sounds like this issue...
http://activemq.apache.org/the-vm-transport-starts-a-broker-before-my-configured-broker-starts.html

switch your RAR configuration to use tcp:// will avoid the
vm://localhost broker being auto-started.
-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message