Skip to Content
avatar image
Former Member

Scope of a Bean

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Aug 10, 2004 at 08:16 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2004 at 08:36 AM

    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

    Add comment
    10|10000 characters needed characters exceeded