Portlet Factory, Version 6.1.2


 

Linked models: non-session singleton

When a linked model is specified to be Non-Session Singleton, multiple instances of this model are created for a given requester session.

Other linked models that reference the same model get their own unique instance. In the non-singleton mode, the linked in models are not stored in the requester's session but instead are held, as a reference, in the model that linked them in. For example, if model A and model B link in model C, there are two instances of model C created for a given session. The linked model slot in the parent model refers to each instance.

Because there are multiple instances of model C and there is not a reference to it in the user's session, links in the pages of model C need to point back to the highest singleton parent model in the chain. For example, if HomePage contained a link to the model doWork method, the link looks like this:

/webengin/A/Action:LM1.doWork

If we add another linked model and model C now links in model D and you want a page in model D to link to its main method, the link looks like this:

/webengin/A/Action:LM1.LM2.main

In this example, LM2 is the builder name of the linked model added to model C.

Parent topic: Linked models


Library | Support |