Lifecycle of an Portal Application
The lifecycle of a portal application is important to perform the initialization and clean up of portal components in an efficient and reliable way. It is composed of three steps:
Initialization
Operation
Disposal
The implementation of these steps depends mainly on the technology chosen for the portal component.
See the PDK:Java Developer/Documentation for more details.
Every portal application implementation has an initialization body. It should contain the coding to render the component on the Web client.

Delay complex operations.
Complex parts of the portal application that are not used in the initial view should not be initialized before the user demands it.
Example:
A portal application has a user interface with tab strip that has two tabs. The first tab contains a clock and the current date. The second tab contains the appointments for the user retrieved from a backend system.
The initialization should contain the steps to render the first tab. Build the tab control and initialize the widget for the clock. For the second tab it just checks the configuration for the connection parameter to connect to the backend system containing the calendar application.
The initialization should not retrieve the appointment data necessary to render the second tab. This should be done when the user actually requests this tab.
The method called for initialization depends on the super class belonging to the portal application model. The methods to implement depend on the selected programming model, so check the documentation for details.
Initialization in portal application models
Model |
Basetype |
Initialize |
Handcrafted portal application |
IPortalComponent |
constructor of the implementing Java class (IPortalComponentInitContext) |
Standard portal application |
AbstractPortalComponent |
init(IPortalComponentIC) |
HTMLB portal application |
DynPage/JSPDynPage (PageProcessorComponent) |
doInitialization() |
In this phase the portal component is initialized and ready to handle requests. Steps that are not handled in the initialization phase are handled now.
The major objectives for the Operationphase are:
· Proper isolation of users and sessions.
· Limitation of resource requirements.
· Stability and verbose error management.
The methods to implement depend on the selected programming model, so check the documentation for details.
Initialization in portal application models
Model |
Basetype |
Callback |
Handcrafted portal application |
IPortalComponent |
Service |
Standard portal application |
AbstractPortalComponent |
on…(…) |
HTMLB portal application |
DynPage/JSPDynPage (PageProcessorComponent) |
doProcessBeforeOutput(), doProcessAfterInput() |
HTMLB portal applications using JSP implement the class JSPDynPage, otherwise the DynPage class has to be implemented.
For more details see:
http://<pdk-server>:<port>/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/dynpage-01.html.
It is strongly recommended that portal components when shutdown (removed from the container) release all used resources, especially caches and connections to backend systems and databases.
All threads created by a portal application, although not recommended, have to be stopped.
Disposal in portal application models
Model |
Basetype |
Callback |
Handcrafted portal application |
IPortalComponent |
destroy() |
Standard portal application |
AbstractPortalComponent |
destroy() |
HTMLB portal application |
DynPage/JSPDynPage (PageProcessorComponent) |
destroy() – inherited from Page ProcessorComponent. POM triggers cleanup when portal application is removed from POM tree. |