Disconnect on Long polling amf channels
Hi,
We have been using AIR for 2 years and are very fond of the technology. Appreciate the efforts Adobe team is taking.
We have an AIR application that uses AMF long polling for recieving updates from the server and AMF channel for request-response model. This application talks to Tomcat server which has blazeds + Java services.
We are testing some of the recovery scenarios such as network disconnect, Server shutdown, Kill server processes.
One the most concerning issue at this point is when the network connection on the server disconnects
1. Client does not detect it is not connected to the server.
2. AMFPolling request does not time out
3. There is no channel fault or channel disconnect recieved by the client
4. Sometimes if the client is reauthenticated back, channels are connected again amf channel works as expected but
AMF long polling stops working.
The flex SDK version is 4.1 and AIR SDK is 2.0. Blazeds 4 and tomcat 6
Please advice how to resolve this issue , we are stuck and so is our release. I have mentioned configuration and channel intialization code snippet -
Service-config.xml -
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
</services>
<channels>
<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"/>
</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.SecureAMFEndpoint"/>
<properties>
<add-no-cache-headers>false</add-no-cache-headers>
</properties>
</channel-definition>
<channel-definition id="my-longpolling-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amflongpollin g" class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-millis>1</polling-interval-millis>
<wait-interval-millis>45000</wait-interval-millis>
<client-wait-interval-millis>1</client-wait-interval-millis>
<max-waiting-poll-requests>3000</max-waiting-poll-requests>
</properties>
</channel-definition>
</channels>
<security>
<security-constraint id="trusted">
<roles>
<role>ROLE_USER</role>
<role>ROLE_ADMIN</role>
</roles>
</security-constraint>
</security>
<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Warn">
<properties>
<prefix>[BlazeDS] </prefix>
<includeDate>false</includeDate>
<includeTime>false</includeTime>
<includeLevel>false</includeLevel>
<includeCategory>false</includeCategory>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
<pattern>Service.*</pattern>
<pattern>Configuration</pattern>
</filters>
</target>
</logging>
<system>
<redeploy>
<enabled>false</enabled>
</redeploy>
</system>
</services-config>
//long polling Chanel initialization -
model.cs = new ChannelSet();
if((model.getConfiguration().server as String).indexOf("https")==0)
{
amfChannel = new SecureAMFChannel("my-secure-amf",model.getConfiguration().server + "/messagebroker/amflongpolling");
}
else
{
amfChannel = new AMFChannel("my-longpolling-amf",model.getConfiguration().server + "/messagebroker/amflongpolling");
}
//amf channel intialization
_bService.endpoint = model.getConfiguration().server + "/messagebroker/amf";
_cService.endpoint = model.getConfiguration().server + "/messagebroker/amf";
// Login code
var token:AsyncToken = model.cs.login(username, password);
token.addResponder(
new AsyncResponder(
function(event:ResultEvent, token:Object = null):void
{
logger.debug(" login success setting values to model");
},
function(event:FaultEvent, token:Object = null):void
{
logger.debug(" login Failed setting values to model");
}
)
);
