Spring DMLC在加载测试后停止显示消息

时间:2012-08-29 13:58:56

标签: java spring jboss jms

我在一个独立的环境中使用Spring3.1。

我已经配置了DMLC(DefaultMessageListenerContainer),它可以侦听远程jboss4服务器上的远程主题。

我遇到了20万个垃圾后出现了可怕的情况,我得到了很高的价格(可能会更少)

监听器停止接收消息而没有错误/警告。

但另一方面,该应用程序仍在运行。 (还有什么事我需要杀死-9进程和常规./stop脚本不会帮助)

我配置错误了什么?

这是我的配置:

<bean id="TgwListenerDLMC"
    class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="topicConnFactory" />
    <property name="pubSubDomain" value="true" />
    <property name="destinationResolver" ref="destinationResolver" />
    <property name="concurrentConsumers" value="1" />
    <property name="destinationName" value="/topic/TopicRealTime" />
    <property name="messageListener" ref="TgwMDB" />
    <property name="sessionAcknowledgeModeName" value="AUTO_ACKNOWLEDGE" />
    <property name="recoveryInterval" value="5000" />

</bean>

<bean id="topicConnFactory"
        class="org.springframework.jms.connection.CachingConnectionFactory">
        <property name="targetConnectionFactory" ref="jndiTopicConnFactory" />
        <property name="reconnectOnException" value="true" />
        <!-- Number of sessions that will be cached -->
        <property name="sessionCacheSize" value="20" />
    </bean>


    <bean id="jndiTopicConnFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiTemplate" ref="jndiTemplate" />
    <!-- JNDI name of connection factory as defined by provider -->
    <property name="jndiName" value="ConnectionFactory" />
</bean>

<bean id="destinationResolver"
    class="org.springframework.jms.support.destination.JndiDestinationResolver">
    <property name="jndiTemplate" ref="jndiTemplate" />
    <property name="cache" value="true" />
    <!--
        do not create a dynamic destination if the destination name is not
        found in JNDI
    -->
    <property name="fallbackToDynamicDestination" value="false" />
</bean>


<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
        <props>
            <prop key="java.naming.provider.url">${java.naming.provider.url}</prop>
            <prop key="java.naming.factory.initial">${java.naming.factory.initial}</prop>
            <prop key="java.naming.factory.url.pkgs">${java.naming.factory.url.pkgs}</prop>
        </props>
    </property>
</bean>

这是带有jstack的ThreadDump打印:

[Loaded sun.reflect.GeneratedConstructorAccessor17 from __JVM_DefineClass__]
2012-08-29 14:45:37,771 org.springframework.jms.connection.CachingConnectionFactory [WARN] Encountered a JMSException - resetting the underlying JMS Connection

javax.jms.JMSException: Failure on underlying remoting connection
        at org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener.handleConnectionException(ConsolidatedRemotingConnectionListener.java:102)
        at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:608)
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor88 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor89 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor90 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor91 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor92 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor93 from __JVM_DefineClass__]
[Loaded sun.reflect.GeneratedSerializationConstructorAccessor94 from __JVM_DefineClass__]

感谢, 射线。

0 个答案:

没有答案