簡體   English   中英

為什么不調用Spring / Flex / BlazeDS Messaging服務適配器?

[英]Why is the Spring/Flex/BlazeDS Messaging service-adapter not called?

我已將服務適配器附加到spring消息目標,如下所示:

<flex:message-destination 
    id="secured-chat" 
    send-security-constraint="trusted" 
    subtopic-separator="." 
    service-adapter="secured-chatAdapter" 
    allow-subtopics="true" />

在bean的初始化過程中會調用init方法,並且在發送新消息時會收到“調用”消息。

但是,永遠不會調用allowSubcribe和其他方法。 是否有導致此問題的常見原因?

我發現這類BlazeDS問題很難診斷。 我的建議是配置非常詳細的日志記錄。 Flex 2開發人員指南:配置服務器端服務日志》中有更多詳細信息。

編輯./WEB-INF/flex/services-congif.xml並將日志記錄節點添加/修改為如下所示:

<logging>
    <target class="flex.messaging.log.ServletLogTarget" level="debug">
        <properties>
            <prefix>[BlazeDS] </prefix>
            <includeDate>true</includeDate>
            <includeTime>true</includeTime>
            <includeLevel>true</includeLevel>
            <includeCategory>true</includeCategory>
        </properties>
        <filters>
            <pattern>Endpoint.*</pattern>
            <pattern>Service.*</pattern>
            <pattern>Message.*</pattern>
            <pattern>Message.Command.*</pattern>
            <pattern>MessageSelector</pattern>
            <pattern>Service.Message</pattern>
        </filters>
    </target>
</logging>

您可以從上面的鏈接添加其他過濾器模式,這可能對您很重要。 如果您沒有找到罪魁禍首,則在此處發布更多的services-config.xml和日志文件,我們將看到可以做什么。

快速警告:它會變得非常冗長。 不要在生產服務器上執行此操作!

問題在於消費者尚未定義副主題。 因為沒有要訂閱的子主題,所以沒有調用子主題特定的權限方法。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM