James,

Sugestion 1 did the trick. I changed the ra.xml from vm://localhost to
tcp://localhost:61616 and now I just have the embedded broker. 

I failed to test your second suggestion with the vm://nameOfYourBroker. Does
this mean the broker-config.xml needs a transportConnector configured like
so?

<transportConnector uri="vm://embedded" discoveryUri="multicast://default"/>


I am wondering what the side-effects of the first action are. Does this mean
that I loose the efficiency of the vm transport, because the tcp network
roundtrip is introduced?

Cheers,
Jan Arend


James.Strachan wrote:
> 
> On 3/14/07, James Strachan <[EMAIL PROTECTED]> wrote:
>> On 3/11/07, Jan Arend Jansen <[EMAIL PROTECTED]> 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.
> 
> Or use vm://theNameOfTheBroker from your activemq.xml file
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Two-brokers-when-embedding-in-Jboss-tf3385705s2354.html#a9483325
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to