[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: Embedded broker on JBoss with tcp transport possible?
From:       Gary Tully <gary.tully () gmail ! com>
Date:       2010-08-31 9:13:22
Message-ID: AANLkTik5w0X-4tV_ifD+uF3cv9t2Z689cqPzbc0krw+c () mail ! gmail ! com
[Download RAW message or body]

Have a peek at the ra.xml in the RAR, META-INF/ra.xml

Note the commented out BrokerXmlConfig value, this can be used to
specify the broker confguration for an embedded broker

<config-property>
            <description>
              Sets the XML configuration file used to configure the
embedded ActiveMQ broker via
              Spring if using embedded mode.

              BrokerXmlConfig is the filename which is assumed to be
on the classpath unless
              a URL is specified. So a value of foo/bar.xml would be
assumed to be on the
              classpath whereas file:dir/file.xml would use the file system.
              Any valid URL string is supported.
            </description>
            <config-property-name>BrokerXmlConfig</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value></config-property-value>
            <!--
             To use the broker-config.xml from the root for the RAR
               <config-property-value>xbean:broker-config.xml</config-property-value>
             To use an external file or url location
               <config-property-value>xbean:file:///amq/config/jee/broker-config.xml</config-property-value>
                
            -->
        </config-property>

On 25 August 2010 15:25, zeeman <zeeman@zeeman.de> wrote:
> Hi everyone!
> 
> I'm quite new to ActiveMQ and unable to achieve my desired
> configuration.
> 
> I have two JBoss (4.2.3) instances running in prallel (*not*
> clustered) which works quite fine.
> Now I want to add a single logical JMS queue to both.
> 
> From my research JDBC master/slave seems quite well-suited.
> I want to use it *in conjuntion* with the embedded ActiveMQ broker as
> I don't want a new box/process doing dedicated JMS work.
> I also want to use the RAR-deployment of ActiveMQ on JBoss to
> participate in the XA transaction (or is there another configuration
> choice to participate in the XA transaction?)
> 
> Though in my simple mind both JBoss' start a embedded broker with
> Master/slave JDBC persistence store. One of these will get the lock on
> the DB and act as master.
> 
> My applications on the JBoss in turn will connect via failover to one
> of the two JBoss embedded ActiveMQ brokers. Because the slave won't
> start any transports both applications will end up on the master
> broker.
> Though one application will connect to "itself" because the master
> (JBoss1) is running on the same JBoss and the other applicaiton
> (JBoss2) will connect to the broker running on the other JBoss (JBoss1)
> instance.
> In case of an failure of the "master" JBoss1 the application running
> on the slave JBoss2 will use "it's own" embedded broker which in turn
> promotes to a master broker.
> In case of a recovery of the former master JBoss1 it will launch its
> broker in slave mode (due tue the already existing database lock) and
> the application connects to the master broker on JBoss2.
> 
> --------------------------------------------------
> > JBoss 1                                        |
> > -------------------                            |
> > > Applicatiion    |                       ------------------
> > > --------------             |Embedded Broker1|
> > > > JMS Client 1|***********>>|   Master       |
> > > --------------   ********>>|                |***
> > -------------------             *         -----------------   *
> ----------------------------------*---------------              *
> *                           ------
> *                           | DB |
> ----------------------------------*---------------            ------
> > JBoss 2                         *              |              *
> > -------------------             *              |              *
> > > Applicatiion    |             *         ------------------  *
> > > --------------   *         |Embedded Broker2|***
> > > > JMS Client 2|****         |   Slave        |
> > > --------------             |                |
> > -------------------                       ------------------
> --------------------------------------------------
> 
> That's the dream.
> 
> Sadly I'm not going very far:
> I'm not able to launch a embedded broker inside JBoss via a RAR with
> tcp transport.
> Usuing vm://localhost works but I get no tcp port open (obvious)
> Usuing tcp://localhost:61616 fails with a connection refuse (because
> no broker was started I guess).
> 
> 
> Can anyone tell me how to configure to reach my goal?
> I'm happy to provide more information if I missed something.
> 
> 
> Kind regards,
> Sebastian
> 
> 



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic