This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 21, 2011, 12:35 PM
5 Posts

Re: NotesDatabase() Object in scoped variables

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: scoped variable,sessionScope,NotesDatabase,Object
  • Replies: 5
 You can't put Domino objects into the scope variables because the Domino Objects are recycled by the server.
 
I think I understand why you are trying to do it, you have a config databases that contains lookup tables etc. and you want to put them it into the scope for easy assess and to cut down on open DB handles.
 
If this is what your doing then I'd suggest a serialized function that reads the values into an application scope ( so all users of the app can benefit ). the function would create a hashmap, put all the lookup vales into it and then return it as an array to the caller. The next time the function is called it checks to see if the hashmap exists and if it does it just returns it without having to open the config database. Then you can add some sort of expiry system to the function that checks to see if the values in the hashmap are older then, say 60 minutes, then update the hashmap before returning it.
 
Hope that helps. 
Mar 21, 2011, 1:48 PM
8 Posts
Re: NotesDatabase() Object in scoped variables
 It is too much what I need from the configuration database, but for some special config values your solution sounds good. Thank you :-) 
Apr 22, 2011, 3:36 PM
135 Posts
Re: NotesDatabase() Object in scoped variables
That's a pity. It would make scope variables much more useful if you could store setup documents etc. Scope variables are destroyed any way soon (the time depending on which scope you choose) and I don't understand why Domino wants to destroy them immediately. Hopefully this will be fixed at some point.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal