I am trying to find the right configuration to support both http / s requests in a Flex application. I have read all the docs and they reference the following:
<default-channels> <channel ref="my-secure-amf"> <serialization> <log-property-errors>true</log-property-errors> </serialization> </channel> <channel ref="my-amf"> <serialization> <log-property-errors>true</log-property-errors> </serialization> </channel>
This works great when entering the application via https, but it causes intermittent communication failures when you get to the same application via http. Here's the abbreviated services-config.xml:
<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel"> <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/> <properties> <add-no-cache-headers>false</add-no-cache-headers> <connect-timeout-seconds>10</connect-timeout-seconds> </properties> </channel-definition> <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel"> <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.AMFEndpoint"/> <properties> <add-no-cache-headers>false</add-no-cache-headers> <connect-timeout-seconds>10</connect-timeout-seconds> </properties> </channel-definition>
I work with Tomcat 5.5.17 and Java 5.
- BlazeDS docs say this is best practice. Is there a better way?
- With this configuration, there are apparently 2-3 repetitions associated with each channel defined in the default-channels element, so it always takes ~ 20 s before the my-amf channel is connected via an HTTP request. Is there a way to undo 2-3 repetitions to say: 1 repeat for each channel?
Thanks in advance for your answers.
source share