on 04-19-2004 4:24 PM
Hi all,
Can anyone give me a simple description of the following?
1)Request (IPortalComponentRequest)
2)Session (IPortalComponentSession)
3)Context (IPortalComponentContext)
4)Profile (IPortalComponentProfile)
I am familiar with how to store and retrieve data but I would like to know
Where each stores the data?
The object scope/visibility?
When should I use each of these?
Any help would be appreciated,
Thanks
Denis.
1) Wrapper around HTTPRequest, only stored for the current call
2)Wrapper around HTTPSession, stored as long as the session is active
3)Uncertain of this
4)Each component has its own name space and objects are stored somewhere in the portal infrastructure. The problem with storing objects here is that the portal may release these objects whenever it feels like it (needs more memory). I've experienced this loads of time on EP 5.0, where it is documented as a "feature" (don't know if it has been changed for EP 6). Use this when you want to store objects that might not be there the next time you look.
Generally I would say,
Use 1 or 4 if the object is only required as a bean for a jsp.
Use 2 for all data which you must have stored for subsequent calls (note that this data will be stored as long as the user is logged in). You need to manage the namespace so use you component name as a prefix to the names
Use 4 if you need data for subsequent calls of the component, but it doesn't matter if the data is lost (it usually only happens after 15 min of idle time on a normal load system)
hopes this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.