Each ActiveMQ instance has a name which must be unique for it to operate within 
a network of brokers (which most people want - its clustered then).

I'm not familiar with the config below - my reading of the docs says that every 
time you give a value to the broker property you are asking for another 
embedded broker. Supply a null value and it won't start one. You only need one 
- with transport connectors for your needs.

Sent from my iPad

On 2 Mar 2013, at 20:02, Bharath <[email protected]> wrote:

> I read in TomEE documentation  here
> <http://tomee.apache.org/activemqresourceadapter-config.html>   that
> multiple ActiveMQResourceAdapter declarations are allowed. I tried
> configuring openwire, websocket and amqp using the following config but I
> get the following exception -
> 
> SEVERE: Failed to start Apache ActiveMQ (localhost, null). Reason:
> javax.management.InstanceAlreadyExistsException:
> org.apache.activemq:BrokerName=localhost,Type=Broker
> javax.management.InstanceAlreadyExistsException:
> org.apache.activemq:BrokerName=localhost,Type=Broker
> 
> 
> *My Configuration in tomee.xml -*
> 
> 
> <Resource id="MyWebSocketResourceAdapter" type="ActiveMQResourceAdapter">
>    BrokerXmlConfig =  broker:(ws://localhost:61614) 
>    ServerUrl       =  vm://localhost
> </Resource>
> 
> <Resource id="MyWebSocketConnectionFactory"
> type="javax.jms.ConnectionFactory">
>    ResourceAdapter = MyWebSocketResourceAdapter
> </Resource>
> 
> 
> 
> <Resource id="MyOpenwireResourceAdapter" type="ActiveMQResourceAdapter">
>    BrokerXmlConfig = 
> broker:(tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600)
>  
>    ServerUrl       =  vm://localhost
> </Resource>
> 
> <Resource id="MyOpenwireConnectionFactory"
> type="javax.jms.ConnectionFactory">
>    ResourceAdapter = MyOpenwireResourceAdapter
> </Resource>
> 
> 
> 
> <Resource id="MyAMQPResourceAdapter" type="ActiveMQResourceAdapter">
>    BrokerXmlConfig = 
> broker:(amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600)
>  
>    ServerUrl       =  vm://localhost
> </Resource>
> 
> <Resource id="MyAMQPConnectionFactory" type="javax.jms.ConnectionFactory">
>    ResourceAdapter = MyAMQPResourceAdapter
> </Resource>
> 
> Thanks for all the help.
> 
> 
> 
> --
> View this message in context: 
> http://openejb.979440.n4.nabble.com/ActiveMQ-in-TomEE-tp4661143p4661160.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to