org.pentaho.platform.engine.core.system
Class PentahoSessionHolder

java.lang.Object
  extended by org.pentaho.platform.engine.core.system.PentahoSessionHolder

public class PentahoSessionHolder
extends Object

Stores the IPentahoSession session object for the current thread so that a web service bean can get to it without requiring it to be passed to its methods

Author:
jamesdixon

Constructor Summary
PentahoSessionHolder()
           
 
Method Summary
static IPentahoSession getSession()
          Returns the IPentahoSession for the current thread
static void removeSession()
          Removes the IPentahoSession for the current thread.
static void setSession(IPentahoSession session)
          Sets an IPentahoSession for the current thread
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PentahoSessionHolder

public PentahoSessionHolder()
Method Detail

setSession

public static void setSession(IPentahoSession session)
Sets an IPentahoSession for the current thread

Parameters:
session -

getSession

public static IPentahoSession getSession()
Returns the IPentahoSession for the current thread

Returns:
thread session

removeSession

public static void removeSession()
Removes the IPentahoSession for the current thread. It is important that the framework calls this to prevent session bleed- through between requests as threads are re-used by the server.