activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully" <gary.tu...@gmail.com>
Subject Re: Shut down an embedded broker defined in Spring context
Date Tue, 04 Nov 2008 11:58:59 GMT
add an id attribute to the amq:broker bean and get a handle on the
bean using your spring context, then call shutdown on it.

for logging, see:
http://activemq.apache.org/how-can-i-enable-detailed-logging.html

2008/11/4 hanson2010 <hanson2010@gmail.com>:
>
> Spring context configuration is as below... Now my pain is I can start up the
> broker with the application. But after captured Ctrl+C, the application
> exits promptly. So I want to do this more gracefully to shut it down.
>
> BTW, how can I switch on log output of the broker.
>
>        <amq:broker useJmx="false" useShutdownHook="true" persistent="true"
>                dataDirectory="./data">
>                <amq:persistenceAdapter>
>                        <amq:amqPersistenceAdapter syncOnWrite="false"
>                                directory="./data" maxFileLength="32 mb" />
>                </amq:persistenceAdapter>
>                <amq:transportConnectors>
>                        <amq:transportConnector uri="tcp://localhost:${amq.port}" />
>                </amq:transportConnectors>
>        </amq:broker>
>
>        <amq:queue id="destination" physicalName="${amq.queue}" />
>
>        <amq:connectionFactory id="jmsConnectionFactory"
>                brokerURL="vm://localhost" />
> --
> View this message in context: http://www.nabble.com/Shut-down-an-embedded-broker-defined-in-Spring-context-tp20316945p20316945.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Mime
View raw message