Re: [flexcoders] Re: AMF3 ping???

2008-12-08 Thread andrea bianchi
Thank you, this is a really helpful information.

Regards,

Andrea


On Fri, Dec 5, 2008 at 10:43 PM, Seth Hodgson <[EMAIL PROTECTED]> wrote:

>   The messaging/transport layer in Flex 2 and 3 is based on channels. A
> channel always handshakes with a server endpoint before passing
> application-generated messages/requests over its connection.
>
> So you'll see a ping command issued each time a channel initially connects.
> If a request fails due to a network problem such that the channel moves to a
> disconnected state, the next message/request the app sends will trigger it
> to reconnect, and it'll do so by sending another ping command.
>
> But this only happens when a channel is attempting to move from a
> disconnected state to a connected state.
>
> The one exception to this rule is when you're using an HTTPService or
> WebService component that's hitting a remote endpoint directly rather than
> going through the proxy service in BlazeDS or LCDS. This scenario uses a
> "direct" channel that always considers itself connected.
>
> Best,
> Seth
>
> From: flexcoders@yahoogroups.com  [mailto:
> flexcoders@yahoogroups.com ] On Behalf Of
> valdhor
> Sent: Friday, December 05, 2008 6:31 AM
> To: flexcoders@yahoogroups.com 
> Subject: [flexcoders] Re: AMF3 ping???
>
>
> I don't know about BlazeDS but with WebORB you get a ping (It's
> actually called a "Command Message") just before the first server
> access. Any server requests after that are only sent once (ie. no
> "Command Message").
>
> Now, it seems to me that this will work this way for a while and the
> this "Command Message" is sent again. I don't know if this happens
> automatically after a certain amount of idle time or whatever.
>
> Has anyone else seen this? Has anyone read the AMF3 spec to see if
> this is standard behaviour?
>
> --- In flexcoders@yahoogroups.com , "andrea
> bianchi" <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > debugging my application I discovered that every request produces
> two POSTs.
> > I'm connecting a RemoteObject to an AMFEndpoint of BlazeDS. Reading the
> > content of the POST data (using HTTPFox) I guessed one is a sort of
> ping,
> > the other is the "real" request. The application works fine but I
> actually
> > don't understand the need of this "ping" (and the documentation doesn't
> > speak about it).
> > Actually this behaviour is confirmed from the Flashlog.txt:
> >
> > 08:25:44.692 [INFO] mx.messaging.Producer
> > '5DE3A67A-5244-ACD0-5814-0640997D7449'
> > producer sending message '6EADA155-B3EE-4DC4-6AB5-06409DF3CAEE'
> > 08:25:44.718 [DEBUG] mx.messaging.Channel 'amf' pinging endpoint.
> > 08:25:44.750 [INFO] mx.messaging.Channel 'amf' channel is connected.
> > 08:25:44.755 [DEBUG] mx.messaging.Channel 'amf' channel sending message:
> > (mx.messaging.messages::RemotingMessage)#0
> > ...
> >
> > Can someone please clarify this? I tried playing with BlazeDS
> configuration
> > files but I didn't find anything. Is there any way to disable the
> "ping"?
> >
> > Thank you,
> >
> > Andrea
> >
>
>  
>


RE: [flexcoders] Re: AMF3 ping???

2008-12-05 Thread Seth Hodgson
The messaging/transport layer in Flex 2 and 3 is based on channels. A channel 
always handshakes with a server endpoint before passing application-generated 
messages/requests over its connection.

So you'll see a ping command issued each time a channel initially connects. If 
a request fails due to a network problem such that the channel moves to a 
disconnected state, the next message/request the app sends will trigger it to 
reconnect, and it'll do so by sending another ping command.

But this only happens when a channel is attempting to move from a disconnected 
state to a connected state.

The one exception to this rule is when you're using an HTTPService or 
WebService component that's hitting a remote endpoint directly rather than 
going through the proxy service in BlazeDS or LCDS. This scenario uses a 
"direct" channel that always considers itself connected.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of valdhor
Sent: Friday, December 05, 2008 6:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AMF3 ping???

I don't know about BlazeDS but with WebORB you get a ping (It's
actually called a "Command Message") just before the first server
access. Any server requests after that are only sent once (ie. no
"Command Message").

Now, it seems to me that this will work this way for a while and the
this "Command Message" is sent again. I don't know if this happens
automatically after a certain amount of idle time or whatever.

Has anyone else seen this? Has anyone read the AMF3 spec to see if
this is standard behaviour?

--- In flexcoders@yahoogroups.com, "andrea bianchi" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> debugging my application I discovered that every request produces
two POSTs.
> I'm connecting a RemoteObject to an AMFEndpoint of BlazeDS. Reading the
> content of the POST data (using HTTPFox) I guessed one is a sort of
ping,
> the other is the "real" request. The application works fine but I
actually
> don't understand the need of this "ping" (and the documentation doesn't
> speak about it).
> Actually this behaviour is confirmed from the Flashlog.txt:
>
> 08:25:44.692 [INFO] mx.messaging.Producer
> '5DE3A67A-5244-ACD0-5814-0640997D7449'
> producer sending message '6EADA155-B3EE-4DC4-6AB5-06409DF3CAEE'
> 08:25:44.718 [DEBUG] mx.messaging.Channel 'amf' pinging endpoint.
> 08:25:44.750 [INFO] mx.messaging.Channel 'amf' channel is connected.
> 08:25:44.755 [DEBUG] mx.messaging.Channel 'amf' channel sending message:
> (mx.messaging.messages::RemotingMessage)#0
> ...
>
> Can someone please clarify this? I tried playing with BlazeDS
configuration
> files but I didn't find anything. Is there any way to disable the
"ping"?
>
> Thank you,
>
> Andrea
>