Jul 16, 2012 8:55 AM
5 Posts

What to use instead a sessionScope variable over more applications ?

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: sessionScope,sessionScope SSJS Variable,sessionScope surrogate
  • Replies: 2
 
 
Due to this response from Thomas Gumz  
 
 
it is not possible to use a sessionScope variable outside the current application.
 
Unfortunately I am in need to store a central URL of an XPage in one mobile start application so that it is accessible and readable from different applications/XPages by the same acting user. I would like o use something similar to sessionScope but over more than one application before doing it with a cookie or a user specific profile document / field. 
 
Is there some SSJS possibility similar to sessionScope to do it ?
 
Any idea would be highly appreciated.
Jul 17, 2012 6:07 AM
129 Posts
Re: What to use instead a sessionScope variable over more applications ?
There is no built in API to do this.
 
You could write your own API to do this. See this blogpost by Tim Tripcony for inspiration: 
http://xmage.gbs.com/blog.nsf/d6plinks/TTRY-8NKTPN 
Jul 23, 2012 3:55 AM
261 Posts
Re: What to use instead a sessionScope variable over more applications ?
The XSP Starter Kit (available on OpenNTF) has an example of how you might implement a "server scope". Since there's only one JVM for XPages on a Domino server, it's basically just a Java singleton. An example on how to write a singleton for XPages can als be found here.
 
Mark