Skip to main content
vshare
Known Participant
August 8, 2011
Question

Disconnect on Long polling amf channels

  • August 8, 2011
  • 2 replies
  • 2551 views

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");

}

)

);

This topic has been closed for replies.

2 replies

vshare
vshareAuthor
Known Participant
August 9, 2011

Entered a bug successfully this time

https://bugbase.adobe.com/index.cfm?event=bug&id=2938647 please vote if you observe similar issue

vshare
vshareAuthor
Known Participant
September 9, 2011

I appreciate Adobe teams efforts to reproduce the issue and acknowledged it as a  Bug in AIR

But now I am waiting on them to come back with an answer -  Is it going to be fixed in future versions? Is there a work around?

Is adobe even considering this as an Issue? What are the next steps after acknowleding the issue?

I hope I am not too aggressive but I also want Adobe to understand the urgency of the situation when it comes to a product release.

I have experimented with couple of work arounds but none seem to work.

If anyone has come across this issue please comment.

Thanks,

chris.campbell
Community Manager
Community Manager
September 10, 2011

I've sent email to the team that triages those bugs asking for an update.  Will let you know when I hear back.

Thanks,
Chris

chris.campbell
Community Manager
Community Manager
August 8, 2011

Would you mind opening a new bug report against this?

http://bugbase.adobe.com

Thanks,

Chris

vshare
vshareAuthor
Known Participant
August 9, 2011

Thanks for the prompt response.

I entered a bug yesterday but after submitting the bug I cannot find it. I am not sure how to track it now.

This issue is a show stopper for our Apllication, Is there anyway I can get some answers on this issue at the earliest.

chris.campbell
Community Manager
Community Manager
August 9, 2011

I just went through all of the different products on bugbase.adobe.com and I couldn't find your report either   Would you mind entering it again?  Once entered, you should be able to save the URL off for future reference.  I'd actually recommend posting the URL to places were other developers might be affected.  Votes for a bug can have a significant impact.

Chris