We are using Lingo and ActiveMQ-RC2 running within servicemix 3.  We are using the failover transport between the lingo client and the server.

We bring both sides up, and all is well.  We then bring the server down (kill it), and the client attempts to reconnect as expected.  When it discovers the server is ready, it attempts to connect, but throws a ClassCastException in the following code:

ConnectionStateTracker
protected void restoreTempDestinations(Transport transport, ConnectionState connectionState) throws IOException {
        // Restore the connection's temp destinations.
        for (Iterator iter2 = connectionState.getTempDesinations().iterator(); iter2.hasNext();) {
            transport.oneway((DestinationInfo) iter2.next());
        }
    }

The error we get is:
2006-05-04 10:46:30,163 DEBUG [org.apache.activemq.transport.failover.FailoverTransport ] Connect fail to: tcp://localhost:2001, reason: java.lang.ClassCastException: org.apache.activemq.command.ActiveMQTempQueue

Our lingo configuration is as follows:

    Client:
        <property name="connectionFactory">
            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL">
                    <value>failover:(tcp://host:port)?maxReconnectAttempts=0</value>
                </property>
            </bean>
        </property>
    </bean>

    <bean id="clientDestination" class="org.apache.activemq.command.ActiveMQQueue">
        <constructor-arg index="0" value="clientDestination" />
    </bean>

    <!-- client side proxy-->
    <bean id="client" class="org.logicblaze.lingo.jms.JmsProxyFactoryBean">
        <property name="serviceInterface" value="com.proteus.messagebroker.warehouse.WarehouseClientService" />
        <property name="connectionFactory">
            <ref local="jmsFactory" />
        </property>
        <property name="destination" ref="clientDestination" />
    </bean>

    Server:

    <bean id="server" class="org.logicblaze.lingo.jms.JmsServiceExporter" depends-on="broker">
        <property name="service" ref="warehouseClientServiceImpl" />
        <property name="serviceInterface" value="com.proteus.messagebroker.warehouse.WarehouseClientService" />
        <property name="connectionFactory" ref="jmsFactory" />
        <property name="destination" ref="clientDestination" />
    </bean>

Our activemq broker is running embedded within servicemix 3 and is as follows:
 <broker useJmx="true">

    <persistenceAdapter>
      <journaledJDBC journalLogFiles="5" dataDirectory="./data"/>
    </persistenceAdapter>
 
    <transportConnectors>
       <transportConnector uri="tcp://localhost:2001"/>
    </transportConnectors>
    
    <networkConnectors>
      <networkConnector uri="static://(tcp://localhost:2001)"/>
    </networkConnectors>
    
  </broker>

Anyone know what might be causing this issue?

Thanks!

Birch

Reply via email to