[ 
https://issues.apache.org/activemq/browse/AMQ-2305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52493#action_52493
 ] 

Joe Fernandez commented on AMQ-2305:
------------------------------------

gary, i don't have a stack trace but below is some debug output

note my embedded notes, which i've pointed out with  '<----'

the cfg files for the master and slave follow the debug output; both brokers 
wrote to the same log file 

2009-06-25 21:09:33,718 [/127.0.0.1:3457] INFO  TransportConnection            
- Slave Broker slave is attached
2009-06-25 21:09:39,078 [Thread-4       ] INFO  BrokerService                  
- ActiveMQ Message Broker (slave, ID:DIEGO-3454-1245978572796-1:0) is shutting 
down
2009-06-25 21:09:39,078 [Thread-4       ] DEBUG BrokerService                  
- Caught exception, must be shutting down: java.lang.IllegalStateException: 
Shutdown in progress
2009-06-25 21:09:39,093 [Thread-4       ] DEBUG VMTransportFactory             
- Shutting down VM connectors for broker: slave
2009-06-25 21:09:39,093 [r: vm://slave#0] DEBUG TransportConnection            
- Stopping connection: vm://slave#0
2009-06-25 21:09:39,093 [r: vm://slave#0] DEBUG TransportConnection            
- Stopped transport: vm://slave#0
2009-06-25 21:09:39,093 [r: vm://slave#0] DEBUG TransportConnection            
- Cleaning up connection resources: vm://slave#0
2009-06-25 21:09:39,093 [r: vm://slave#0] DEBUG TransportConnection            
- Connection Stopped: vm://slave#0
2009-06-25 21:09:39,093 [Thread-4       ] INFO  TransportConnector             
- Connector vm://slave Stopped
2009-06-25 21:09:39,109 [Thread-4       ] DEBUG TcpTransport                   
- Stopping transport tcp://localhost/127.0.0.1:61616
2009-06-25 21:09:39,109 [/127.0.0.1:3457] DEBUG TransportConnection            
- Stopping connection: /127.0.0.1:3457

2009-06-25 21:09:39,109 [/127.0.0.1:3457] DEBUG JoeBroker                  - 
stop: Entered <---- this is my Broker plugin's stop method getting called

2009-06-25 21:09:39,109 [Thread-4       ] INFO  TransportConnector             
- Connector tcp://localhost:61617 Stopped
2009-06-25 21:09:39,125 [Thread-4       ] INFO  BrokerService                  
- ActiveMQ JMS Message Broker (slave, ID:DIEGO-3454-1245978572796-1:0) stopped
org.apache.activemq:BrokerName=master,Type=XXXXX, XXXX=ActiveMQ XXXXX
2009-06-25 21:09:39,156 [/127.0.0.1:3457] DEBUG TcpTransport                   
- Stopping transport tcp:///127.0.0.1:3457
2009-06-25 21:09:39,156 [/127.0.0.1:3457] DEBUG TransportConnection            
- Stopped transport: /127.0.0.1:3457
2009-06-25 21:09:39,156 [/127.0.0.1:3457] DEBUG TransportConnection            
- Connection Stopped: /127.0.0.1:3457
2009-06-25 21:09:43,437 [MQ ShutdownHook] INFO  BrokerService                  
- ActiveMQ Message Broker (master, ID:DIEGO-3450-1245978553937-0:0) is shutting 
down
2009-06-25 21:09:43,437 [MQ ShutdownHook] DEBUG BrokerService                  
- Caught exception, must be shutting down: java.lang.IllegalStateException: 
Shutdown in progress
2009-06-25 21:09:45,359 [MQ ShutdownHook] INFO  TransportConnector             
- Connector tcp://localhost:61616 Stopped

2009-06-25 21:09:45,375 [MQ ShutdownHook] DEBUG JoeBroker                  - 
stop: Entered <---- This is my plugin's stop method getting called a second time
2009-06-25 21:09:45,375 [MQ ShutdownHook] DEBUG JoeBroker                  - 
stop: JoeBroker has already been stopped

2009-06-25 21:09:45,375 [MQ ShutdownHook] INFO  BrokerService                  
- ActiveMQ JMS Message Broker (master, ID:DIEGO-3450-1245978553937-0:0) stopped


This is the slave's  cfg file

<beans
  xmlns="http://www.springframework.org/schema/beans";
  xmlns:amq="http://activemq.org/config/1.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.org/config/1.0 
http://activemq.apache.org/schema/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring 
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd";>

  <!-- Allows us to use system properties as variables in this configuration 
file -->
  <bean 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker xmlns="http://activemq.org/config/1.0"; brokerName="slave" 
masterConnectorURI="tcp://localhost:61616" deleteAllMessagesOnStartup="true" 
persistent="false">
  
    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
       <transportConnector uri="tcp://localhost:61617" />
    </transportConnectors>

  </broker>

</beans>


This is the master's cfg file 

<beans
  xmlns="http://www.springframework.org/schema/beans";
  xmlns:amq="http://activemq.org/config/1.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.org/config/1.0 
http://activemq.apache.org/schema/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring 
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd";>

  <!-- Allows us to use system properties as variables in this configuration 
file -->
  <bean 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker xmlns="http://activemq.org/config/1.0"; brokerName="master" 
persistent="false" deleteAllMessagesOnStartup="true" plugins="#joe">
  
    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
       <transportConnector uri="tcp://localhost:61616" />      
    </transportConnectors>

  </broker>
  
  <bean id="joe" class="com.ttm.activemq.joe.JoePlugin"/>       

</beans>






> TransportConnection Ignores isShutdownOnSlaveFailure
> ----------------------------------------------------
>
>                 Key: AMQ-2305
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2305
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2, Java 5, Windoze XP Pro 
>            Reporter: Joe Fernandez
>            Assignee: Gary Tully
>         Attachments: TransportConnection.patch
>
>
> In a pure Master/Slave configuration, when the slave fails the 
> TransportConnection invokes the MasterBroker's stop() method without taking 
> into consideration the shutdownOnSlaveFailure boolean, which by default is 
> set to false.  So even if shutdownOnSlaveFailure  is set to false, all my 
> plugin brokers' stop methods get invoked when the slave fails.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to