White Paper: WebLogic Portal Framework
This appendix contains information on the following subjects:
The netuix-config.xml
file is governed by the XML schema definition file netuix-config.xsd
. This file contains settings that can be modified to change the behavior of the portal framework. This file is Web application scoped, and the Web application must be redeployed to pick up changes to the file. The file contains the following elements and attributes:
Enable (default) or disable customization. The portal has two modes of operation. In one mode, users and administrators are allowed to customize the portal using a browser (add/delete portlets, pages, books, etc.).
In this mode the portal EJBs and a database must be deployed. In the second mode (the browser hitting the .portal
file directly) no customization is allowed, so no database or portal EJBs are required. This flag is an indicator to the system what mode of operation the portal is in. To run "light portal" this element must be set to false. To pick up portlets, layouts, shells, look and feels, and themes in the database, this element must be set to true.
Enable (default) or disable Page Flow components. In order to run Page Flow portlets in the portal, this element must be enabled. If you are not running Page Flow applications you can set this element to false and pick up some performance improvements especially during iterative development.
Turn entitlement checking off at runtime. The value of the resource-cache-size attribute is a size for the control resources cache. This size depends on the number of desktops, portlets, pages, placeholders, and books contained in a portal. The size can be determined by enabling debug for com.bea.netuix.servlets.entitlements.ControlResource
in the debug.properties
file located in the domain directory. Debug prints out the size for a portal when clicked on all the pages of a portal. The size to be used is from the last line that is printed on the console after clicking on all the pages (all top-level and inner pages).
Enable (default) or disable localization. When localization is enabled, the portal framework attempts to deliver localized content based on a directory search. Set the enable element to "true" to enable localization. Disable localization by setting this element to "false". For performance reasons, if the portal Web application is prepared to deliver localized content, disable localization. To specify a locale provider, include the locale-provider element with value set to the class of the desired LocaleProvider implementation.
The propagate-preferences-on-deploy element specifies if portlet preferences should be propagated to the underlying preference store or not. If this element is present, portlet preferences will be propagated to the underlying preference store. If the attribute propagate-to-instances is true, portlet preferences will also be propagated to instances created out of portlets.
Because of the way iterative development redeploys the Web application on any changes to a control or Page Flow, this will stop the database from being reloaded if you are in development mode (i.e. !AppDescriptor.isProductionModeEnabled
). This defaults to 'false'. If you are in development mode and you want the database to be reloaded from the Web application on a redeploy, set to 'true'.
The window-state element describes properties of container-supported window states. This element has child elements for each of the different states. You can specify image names and localized alternate text.
<!-- Example of a custom mode in two languages -->
<window-mode name="SourceViewToggleButton">
<activate-image>titlebar-button-source.gif</activate-image>
<deactivate-image>titlebar-button-source-exit.gif</deactivate-image>
<alt-text>
<locale language="en">
<activate>Source View</activate>
<deactivate>Leave Source View</deactivate>
</locale>
<locale language="es">
<activate>la vista de la fuente</activate>
<deactivate>Salga la fuente la vista</deactivate>
</locale>
</alt-text>
</window-mode>
To use the above custom mode in a portlet or book you can do the following:
<netuix:titlebar>
<netuix:modeToggleButton name="SourceViewToggleButton"
contentUri="/source.jsp" />
<netuix:minimize/>
</netuix:titlebar>
Determines whether XML schema validation is performed on the different XML documents that WebLogic Portal parses.
Enable (default) or disable validation of '.' files (portlet, theme, layout, laf). Turing this off can speed up WebLogic Portal start times and redeployment times. However, turning validation off and allowing invalid files causes error.
The control-state-location element specifies the location for storing control state. All the state for the portal framework can be configured to be stored in different ways; each having advantages and disadvantages. The state includes: current page, active pages, window state (minimize, maximized, etc.). Control state is is not the same as application state. Application state is up to each developer.
Stores the control state in the user's HTTP session. This is the default control state location. The control state can be preserved until the end of the session.
Encodes the control state in portal framework generated links. The control state can be preserved forever. However, clients (browsers) may have limits on the maximum number of characters. When the control state length exceeds the specified maximum number of characters, the portal framework automatically switches the state location to HTTP session.
Stores the control state as cookies. The expires attributes may be used to specify the lifetime (in seconds) of cookies user for storing control state.
The netuix-config.xml
contains portal framework related configuration information. It is web-application scoped.
.portal
file (rather than from a database) and users are not allowed to customize it then customization could be disabled by setting "enable" element's value to "false". If a portal supports customizations then customization should be enabled..pinc
, .portlet
, and .portal
files. Disable validation when running portal server in production setup.Note: By default, the entitlements switch is off in the netuix-config.xml file. See the Performance Tuning Guide for instructions on how to enable entitlements.
The application-config.xml
file contains settings for all the caches, it can be found under <enterprise-application-dir>/META-INF/
. For a database based (streaming) portal, the max entries for "portalControlTreeCache" cache should be set to a value based on num of users, available memory and portal size. An ideal value is equal to number of users plus one. If a portal has floatable portlets the above rule should be applied in finding an optimal value for max entries for "portletControlTreeCache" cache.
Note: Don't change "TimeToLive"; it is set to "-1" by default.
The look and feel of a portal uses css
, js
and gif
files. The performance and scalability will improve if these static files are served from a different web server.
The performance and scalability of a portal application also depends on a portal size, number of books, number of pages, number of portlets and number of buttons. The time taken to serve a portal from file or database depends on portal's size as it involves XML parsing.
A portal served from database is cached (portalControlTreeCache) to avoid going to the portal database from second time onwards. The portal is cached for each user, if users have customized their portals. The memory usage goes up as the number of users with customizations increase. Download the portal_size.jar tool to find out memory and response statistics for a portal.
Notes: The memory size calculated is not accurate.
The tool calculates the size of the full control tree, creating statistics for portals whether or not treeOptimization is active.
The portlet's content is referenced by contentUri element in .portlet
file, if it is expensive to compute content every time, consider using renderCacheable portlet attributes to cache portlet's content or if the portlet's content type is jsp
, consider using wl:cache
jsp tags to cache static portions within a jsp
.
The following JVM parameters shown in the following tables: