List Info

Thread: Session management with FMS2 and Remoting




Session management with FMS2 and Remoting
user name
2006-08-07 10:34:53
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)
_______________________________________________
FlashCommchattyfig.figleaf.com
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.c
om
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )