cancel
Showing results for 
Search instead for 
Did you mean: 

VMware View AlwaysOn Desktop Reference Architecture - Response Rule


####


# user configurable variables:


####


$debug = 1;


#Change the below setting which is in seconds to desired value. Default is set to 2 minutes


$time_out = 120;


####




$user = connection.data.get( "uname" );


if( string.length( $user ) ) {


   if( $debug ) { log.info( string.append( "Username: ", $user, " found in the connection data" ) ); }




   # note that we cannot use http.getResponseCookie("JSESSIONID") because view server sends two cookies


   $cookies = http.getResponseCookies();


   $sess_id = $cookies["JSESSIONID"];


  string.length( $sess_id ) ) {


      $pool = connection.getPool();


      $node = connection.getNode();


      $port = string.extractPort( $node );


      $node = string.extractHost( $node );


      $seconds = sys.time() + $time_out;


      if( $debug ) {


         log.info( string.append( "Cookie JSESSIONID: '", $sess_id, "'", " for user ", $user ) );


         log.info( string.append( "Value: Pool=", $pool, " Node=", $node, " Timeout=", $seconds ) );


      }


      data.set( $sess_id, [ "pool" => $pool, "node" => $node, "port" => $port, "user" => $user ] );


      data.set( $user, [ "pool" => $pool, "node" => $node, "timeout" => $seconds, "sessionid" => $sess_id ] );


   }


}



Version history
Revision #:
1 of 1
Last update:
‎03-25-2013 10:09:AM
Updated by: