使用WildFly-8.1.0.Final不遵守属性dLQMaxResent

时间:2014-09-25 10:52:47

标签: java java-ee wildfly wildfly-8

我在使用消息驱动的bean时遇到问题,因为使用WildFly-8.1.0.Final作为应用程序服务器似乎没有遵守dlQMaxResent。

我的jboss-ejb3.xml包含以下设置

<?xml version="1.1" encoding="UTF-8"?>
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
               xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:s="urn:security:1.1"
               xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
               impl-version="2.0" version="3.1">
    <jboss:enterprise-beans>
        <message-driven id="DequeuerBean">
            <ejb-name>DequeuerBean</ejb-name>
            <activation-config>
                <activation-config-property>
                    <activation-config-property-name>dLQMaxResent</activation-config-property-name>
                    <activation-config-property-value>2147483647</activation-config-property-value>
                </activation-config-property>
                <activation-config-property>
                    <activation-config-property-name>maxSession</activation-config-property-name>
                    <activation-config-property-value>20</activation-config-property-value>
                </activation-config-property>
            </activation-config>
        </message-driven>
        <...>
</jboss:ejb-jar>

有人有个主意吗?

1 个答案:

答案 0 :(得分:0)

经过大量研究/调查后,我发现dlQMaxResent不再受到尊重。实现类似功能的唯一方法是向<subsystem xmlns="urn:jboss:domain:messaging:2.0">添加默认配置:

<address-settings>
    <address-setting match="#">
        <dead-letter-address>jms.queue.DLQ</dead-letter-address>
        <expiry-address>jms.queue.ExpiryQueue</expiry-address>
        <redelivery-delay>5000</redelivery-delay>
        <max-delivery-attempts>2147483647</max-delivery-attempts>
        <max-size-bytes>10485760</max-size-bytes>
        <page-size-bytes>2097152</page-size-bytes>
        <address-full-policy>PAGE</address-full-policy>
        <message-counter-history-day-limit>10</message-counter-history-day-limit>
    </address-setting>
</address-settings>

......对我来说效果很好。