Watch what you put in you scoped varables

Your XPage app may run out of memory if you put js functions/classes or domino objects in scoped variables because these objects is not Serializable. So because you can it is not always ok to do that 😉

Leave a Reply

3 Comments on "Watch what you put in you scoped varables"

Notify of
avatar
Sort by:   newest | oldest | most voted
Tim Tripcony
Guest
>Just to clarify: 1. JavaScript functions (and other non-serializable objects) may be stored in the request scope. They may also be stored in higher scopes (view, session, application) if the application settings are configured to keep all pages in memory. This option enhances performance but reduces scalability. Because this setting may change after the application is already deployed to respond to unforeseen usage patterns, it is best to avoid storing non-serializable objects in any scope to ensure that the setting may be changed at will without requiring potentially significant code changes to support the new setting value. 2. Domino objects… Read more »
Admin
Guest

>Great Tim for the update, this is what we need perhaps a wiki document. That could help all developers out there.

Stephan H. Wissel
Guest

What is missing is a mechanism: please store this in a scope and if it is gone I’m fine if you throw it away. Then functions could be cached there and only occasionally need to be reloaded.

wpDiscuz