You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "raimund.fiedler" <ra...@gmx.de> on 2009/06/11 22:14:06 UTC

Non blocking embedded broker startup when using jdbc master-slave setup

Hi,

i'm currently trying to set up multiple master-slave-broker as described in
http://activemq.apache.org/jdbc-master-slave.html. 
The current setup consists of a spring-mvc based application deployed in a
tomcat 5.5.x with an embedded activemq broker. The broker is configured with
some xbeans tags:
<amq:broker id="broker" brokerName="smava" useJmx="true" persistent="true">
    <amq:persistenceAdapter>
        <amq:jdbcPersistenceAdapter createTablesOnStartup="false"
dataSource="#activemq-dataSource"/>
    </amq:persistenceAdapter>
    <amq:transportConnectors>
        <amq:transportConnector uri="vm://localhost" />
    </amq:transportConnectors>
</amq:broker>

When i try to startup a second instance of the application with a second
embedded broker (wich should act as failover), the startup of the
application comes to a halt because the broker waits for a lock in the
database wich is already used by the first broker.
The same issue with deployment to jboss was discussed here:
http://www.nabble.com/jdbcPersistence-behaviour-to13696937s2354.html#a14298283
and fixed here:
https://issues.apache.org/activemq/browse/AMQ-1519

My question is: is there any option to start the embedded broker in a
nonblocking way when its started from
org.apache.activemq.broker.XBeanBrokerService?

If not, is there a preferred way to file this issue in JIRA? 

thanks in advance,
Raimund 


-- 
View this message in context: http://www.nabble.com/Non-blocking-embedded-broker-startup-when-using-jdbc-master-slave-setup-tp23988180p23988180.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Non blocking embedded broker startup when using jdbc master-slave setup

Posted by Gary Tully <ga...@gmail.com>.
I guess so.
All contributions are most welcome!
thanks.

2009/6/12 raimund.fiedler <ra...@gmx.de>

>
> sounds good. does it make sense to provide this as start option in
> XBeanBrokerService?
> If yes, i could provide the necessary patch.
>
> Regards,
> raimund
>
>
>
> Gary Tully wrote:
> >
> > currently an async start option does not exist inXBeanBrokerService
> > you can use <amq:broker ... start=false> so that the broker is not
> started
> > and have a separate bean start a thread that can call the start method.
> >
> > 2009/6/11 raimund.fiedler <ra...@gmx.de>
> >
> >>
> >> Hi,
> >>
> >> i'm currently trying to set up multiple master-slave-broker as described
> >> in
> >> http://activemq.apache.org/jdbc-master-slave.html.
> >> The current setup consists of a spring-mvc based application deployed in
> >> a
> >> tomcat 5.5.x with an embedded activemq broker. The broker is configured
> >> with
> >> some xbeans tags:
> >> <amq:broker id="broker" brokerName="smava" useJmx="true"
> >> persistent="true">
> >>    <amq:persistenceAdapter>
> >>        <amq:jdbcPersistenceAdapter createTablesOnStartup="false"
> >> dataSource="#activemq-dataSource"/>
> >>    </amq:persistenceAdapter>
> >>    <amq:transportConnectors>
> >>        <amq:transportConnector uri="vm://localhost" />
> >>    </amq:transportConnectors>
> >> </amq:broker>
> >>
> >> When i try to startup a second instance of the application with a second
> >> embedded broker (wich should act as failover), the startup of the
> >> application comes to a halt because the broker waits for a lock in the
> >> database wich is already used by the first broker.
> >> The same issue with deployment to jboss was discussed here:
> >>
> >>
> http://www.nabble.com/jdbcPersistence-behaviour-to13696937s2354.html#a14298283
> >> and fixed here:
> >> https://issues.apache.org/activemq/browse/AMQ-1519
> >>
> >> My question is: is there any option to start the embedded broker in a
> >> nonblocking way when its started from
> >> org.apache.activemq.broker.XBeanBrokerService?
> >>
> >> If not, is there a preferred way to file this issue in JIRA?
> >>
> >> thanks in advance,
> >> Raimund
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Non-blocking-embedded-broker-startup-when-using-jdbc-master-slave-setup-tp23988180p23988180.html
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > http://blog.garytully.com
> >
> > Open Source Integration
> > http://fusesource.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Non-blocking-embedded-broker-startup-when-using-jdbc-master-slave-setup-tp23988180p23996792.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Re: Non blocking embedded broker startup when using jdbc master-slave setup

Posted by "raimund.fiedler" <ra...@gmx.de>.
sounds good. does it make sense to provide this as start option in
XBeanBrokerService?
If yes, i could provide the necessary patch.

Regards,
raimund



Gary Tully wrote:
> 
> currently an async start option does not exist inXBeanBrokerService
> you can use <amq:broker ... start=false> so that the broker is not started
> and have a separate bean start a thread that can call the start method.
> 
> 2009/6/11 raimund.fiedler <ra...@gmx.de>
> 
>>
>> Hi,
>>
>> i'm currently trying to set up multiple master-slave-broker as described
>> in
>> http://activemq.apache.org/jdbc-master-slave.html.
>> The current setup consists of a spring-mvc based application deployed in
>> a
>> tomcat 5.5.x with an embedded activemq broker. The broker is configured
>> with
>> some xbeans tags:
>> <amq:broker id="broker" brokerName="smava" useJmx="true"
>> persistent="true">
>>    <amq:persistenceAdapter>
>>        <amq:jdbcPersistenceAdapter createTablesOnStartup="false"
>> dataSource="#activemq-dataSource"/>
>>    </amq:persistenceAdapter>
>>    <amq:transportConnectors>
>>        <amq:transportConnector uri="vm://localhost" />
>>    </amq:transportConnectors>
>> </amq:broker>
>>
>> When i try to startup a second instance of the application with a second
>> embedded broker (wich should act as failover), the startup of the
>> application comes to a halt because the broker waits for a lock in the
>> database wich is already used by the first broker.
>> The same issue with deployment to jboss was discussed here:
>>
>> http://www.nabble.com/jdbcPersistence-behaviour-to13696937s2354.html#a14298283
>> and fixed here:
>> https://issues.apache.org/activemq/browse/AMQ-1519
>>
>> My question is: is there any option to start the embedded broker in a
>> nonblocking way when its started from
>> org.apache.activemq.broker.XBeanBrokerService?
>>
>> If not, is there a preferred way to file this issue in JIRA?
>>
>> thanks in advance,
>> Raimund
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Non-blocking-embedded-broker-startup-when-using-jdbc-master-slave-setup-tp23988180p23988180.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Non-blocking-embedded-broker-startup-when-using-jdbc-master-slave-setup-tp23988180p23996792.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Non blocking embedded broker startup when using jdbc master-slave setup

Posted by Gary Tully <ga...@gmail.com>.
currently an async start option does not exist inXBeanBrokerService
you can use <amq:broker ... start=false> so that the broker is not started
and have a separate bean start a thread that can call the start method.

2009/6/11 raimund.fiedler <ra...@gmx.de>

>
> Hi,
>
> i'm currently trying to set up multiple master-slave-broker as described in
> http://activemq.apache.org/jdbc-master-slave.html.
> The current setup consists of a spring-mvc based application deployed in a
> tomcat 5.5.x with an embedded activemq broker. The broker is configured
> with
> some xbeans tags:
> <amq:broker id="broker" brokerName="smava" useJmx="true" persistent="true">
>    <amq:persistenceAdapter>
>        <amq:jdbcPersistenceAdapter createTablesOnStartup="false"
> dataSource="#activemq-dataSource"/>
>    </amq:persistenceAdapter>
>    <amq:transportConnectors>
>        <amq:transportConnector uri="vm://localhost" />
>    </amq:transportConnectors>
> </amq:broker>
>
> When i try to startup a second instance of the application with a second
> embedded broker (wich should act as failover), the startup of the
> application comes to a halt because the broker waits for a lock in the
> database wich is already used by the first broker.
> The same issue with deployment to jboss was discussed here:
>
> http://www.nabble.com/jdbcPersistence-behaviour-to13696937s2354.html#a14298283
> and fixed here:
> https://issues.apache.org/activemq/browse/AMQ-1519
>
> My question is: is there any option to start the embedded broker in a
> nonblocking way when its started from
> org.apache.activemq.broker.XBeanBrokerService?
>
> If not, is there a preferred way to file this issue in JIRA?
>
> thanks in advance,
> Raimund
>
>
> --
> View this message in context:
> http://www.nabble.com/Non-blocking-embedded-broker-startup-when-using-jdbc-master-slave-setup-tp23988180p23988180.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com