Macromedia Flash Server - Session management with FMS2 and Remoting

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > August 2006 > Session management with FMS2 and Remoting





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Session management with FMS2 and Remoting
Fabio Salvadori

2006-08-07, 7:11 am

hi all,
i create an FMS2 application that work as a proxy between my Flash client
and
a Java webapp that export a service via Remoting.

When the client connect to FMS i create a new connection to the Remoting
service with the following code:

I create this method on my Client object:

Client.prototype.createConnection = function(){
// Connect to the gateway
if(this.gatewayConnection == null){
this.gatewayConnection = NetServices.createGatewayConnection("my
url") ;
this.remotingService =
this.gatewayConnection.getService("remoteService",this);

}
}

When a client connect i use this code:

/**
* onConnect
*/
application.onConnect = function(p_client) {
//disable write access
p_client.writeAccess = "";
p_client.start_time = (new Date()).getTime();
p_client.createConnection();
}

Everything works fine but i've got problems with HTTP sessions management.
At the first request my tomcat server create a new HTTP Session and send a
cookie to FMS2.
From that point all the request starting from that FMS2 server will use the

same cookie.
From my logs i'm sure i create a new connection for every client, sniffing
with ethereal i can see different HTTP connection for every client but all
the
different connection send allways the same cookie to the tomcat server.

I need to have a new HTTP Session for every client but it seems that
creating a new connection with NetServices.createGatewayConnection is not
enough.

There's a way to have FMS2 accepting a new cookie for every remoting
connection?

Previous version of the application (that was based on FCS1.5) works well,
every client connected to my FCS server has it's own session on the
application server.

I made a test also using loadVars function and i get the same result, all
following request use the same session cookie so all requests are executed,
on
tomcat, within the same session.
thanx for your help
fabio

--
Perfection is achieved
not when there is nothing more to add,
but rather when there is nothing more to take away.
(Antoine de Saint-Exupery)
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com