I have attached a service-adapter to a spring message-destination as follows:
<flex:message-destination
id="secured-chat"
send-security-constraint="trusted"
subtopic-separator="."
service-adapter="secured-chatAdapter"
allow-subtopics="true" />
The init methods are called during the bean's initialization, and I get "invoke" messages when new messages are sent.
However, allowSubcribe and other methods are never called. Are there an开发者_如何学Goy common causes of this problem?
I've found these kinds of BlazeDS problems to be tricky to diagnose. My recommendation is to configure very verbose logging. There is more details on the Flex 2 Developer's Guide: Configuring server-side service logging
Edit ./WEB-INF/flex/services-congif.xml
and add/modify the logging node to something like this:
<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>
There are other filter patters you could add from the link above which might be important for you. If you don't see the culprit then post more of your services-config.xml
and log files here and we'll see what we can do.
Quick warning: It can get very verbose. Don't do this on your production server!
The problem was that the Consumers had not defined subtopics. Because there were no subtopics being subscribed to, the subtopic specific permissions methods were not being called.
精彩评论