cancel
Showing results for 
Search instead for 
Did you mean: 

Scope of a Bean

Former Member
0 Kudos

Hi Friends,

Can anybody explain me about the APPLICATION and SESSION Scope of a Bean?.If i need to maintain the state of a bean between pages can i gor for IPortalComponentSession and put the bean object into it?. What should be the value of scope in <jsp:useBean../> if i refer to that bean in a JSP file?.

Can we have several Portal Components within a single page?. Do we call each Portal Component as an iview?.Please explain.

Thanks in advance.

Regards,

Tamilarasan.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

The thing you need to remeber is that if the bean is in the application scope (stored in the IPortalComponentProfile object), the SAP J2EE might release it whenever it wants (if it for example needs more memory), this is not so with the session scope (stored in IPortalComponentSession(?) object) which is deleted only when the http session is deleted.

But remember that the in the session every component is using the same namespace, so it is best to prefix your bean name with the component name in order to avoid conflicts.

An iview is an instance of a portal component, and you group one or more iviews to a page (through the portal content managment functionality). so yes, you can have several components per page

detlev_beutner
Active Contributor
0 Kudos

Hi Tamilarasan,

the conecpt of the different session scopes and of the use of the IPortalComponentSession are explained within the PDK documentation (Java Development - Documentation - Services - Basic Functionality - Beans - Example Store Beans - Usage of Beans).

Nevertheless, this docu isn't the best, but a good starting point.

Hope this hint is worth some points for you (points for me, worth for you )

best regards

Detlev