Chapter 71, Desktop Templates in the Developer Sample Directory
Chapter 72, Portal Server : Java Enterprise System Monitoring Framework Integration
This chapter contains the following sections:
To generate the rendered Desktop user interface (what the industry refers to as the “presentation”), the Sun Java System Portal Server 7.1 software makes use of either JSPs or template files.
The default set of template files are installed in /var/opt/SUNWportal/portals/<portal_id>/desktop/default directory. The developer sample template files are installed in /var/opt/SUNWportal/portals/<portal_id>/desktop/developer_sample and /var/opt/SUNWportal/portals/<portal_id>/desktop/developer_anonymous_sample directories. Files in the /var/opt/SUNWportal/portals/<portal_id>/desktop/developer_anonymous_sample directory are specific to the developer sample Anonymous Desktop.
Providers that use template files hardcode their names and the template file names are not configurable in the Display Profile. For Providers that are based on JSP provider, the names of the JSP used by provider can be administratively changed as it is a property of the channel.
Both JSP and Desktop templates serve the purpose of separating business and presentation logic in the Portal Server 7.1. JSP is an accepted standard and is widely employed in many web-based applications. Desktop templates pre-date the emergence of JSP. JSP has many advantages over Desktop templates.
It is highly recommended that new Portal Server 7.1 providers be based on JSP and the Portal Server 7.1 JSPProvider. However, there may be cases where the simplicity of Desktop templates provides an advantage. Desktop templates are fully supported in Portal Server 7.1. Many pieces of the product, such as the communications channels, continue to use them.
The Portal Server software uses the lookup scenario outlined in this section to find the JSPs it needs. Use this order to decide the final location of your own JSPs.
desktoptype_ locale/ channelname/ clientPath desktoptype_ locale/ provider/ clientPath desktoptype_ locale/ channelname desktoptype_ locale/ provider desktoptype_ locale/ clientPath desktoptype_ locale desktoptype/ channelname/ clientPath desktoptype/ provider/ clientPath desktoptype/ channelname desktoptype/ provider desktoptype/ clientPath desktoptype default_ locale/ channelname/ clientPath default_ locale/ provider/ clientPath default_ locale/channelname default_ locale/ provider default_ locale/ clientPath default_ locale default/ channelname/ clientPath default/ provider/ clientPath default/ channelname default/ provider default/ clientPath default templateroot |
If there is no clientPath specified, then the directory search order is as follows:
desktoptype_ locale/ channelname desktoptype_ locale/ provider desktoptype_ locale desktoptype/ channelname desktoptype/ provider desktoptype default_ locale/ channelname default_ locale/ provider default_ locale default/ channelname default/ provider default templateroot |
The lookup scenario relies on the following parameters:
For example default (set in the administration console). Note that desktop type is now a comma separated string list and so the look up will be based on the desktop type(s) that are defined in the desktoptype attribute.
Preferred locale is the user’s locale. For example, en_US (set by users through the administration console in the “User” setting)
This is an optional file-path containing client-specific templates; for example, html (set through the administration console Client Detection service)
This is the name of the channel; for example, newSingleContainer (set in the display profile)
This is the provider name; for example, JSPSingleContainerProvider (set in the display profile)
This is defined in the desktopconfig.properties file. The root of the search directory (default value of /var/opt/SUNWportal/portals/<portal_id>/desktop/) can be changed by modifying the templateBaseDir property in the desktopconfig.properties file.
This chapter contains the following sections
AddressBookProvider, AppProvider, BookmarkProvider and CalendarProvider
default directory template files
The following table lists the templates in the html subdirectory of the AddressBookProvider, LotusNotesAddressBookProvider, and MSExchangeAddressBookProvider and includes a brief description of the template file. In this two columned table, the left column contains the template file name and the right column includes a brief description of the corresponding template file.
Used for displaying the “Launch Address Book” link
Used for formatting the table headers
Used for formatting the display of the address book entry
Used for displaying error messages
Used for formatting number of total and unread messages
Used for overall channel formatting
Used for creating edit page checkboxes
Used for creating end of the edit page
Used for creating application helper edit link
Used for creating edit page password boxes
Used for creating edit page select boxes
Used for creating edit page select box options
Used for creating the start of the edit page
Used for creating edit page text boxes
Used for creating edit the template
ma edit link template
ma edit template
The template available in the AppProvider subdirectory and its description is:
Contains the JavaScript code that launches the windows that the HTML applications show up in.
The templates available in the html subdirectory of BookmarkProvider and their description are:
Contains JavaScript code for the Bookmark provider to open new windows with the URLs typed in and do the correct URL http:// prepending. Also contains a small bit of formatting for the URL entry box.
Contains the formatting for the Edit page for the Bookmark provider.
Used by the edit page of Bookmark Provider to draw the part where the bookmarks are removed.
Contains the markup for the radio buttons used to select the window option.
Contains markup for each URL shown in display.template.
The templates available in the html subdirectory of the CalendarProvider, LotusNotesCalendarProvider, and MSExchangeCalendarProvider and their description are:
Used for displaying the Launch Calendar link.
Used for displaying the message “No events scheduled for today.”
Used for displaying the message “No tasks are pending for today.”
Used for formatting events
Used for formatting an all day event
Used for formatting other tasks
Used for formatting overdue tasks
Used for formatting a “normal” task
Used for formatting the layout of all tasks and events
Used for displaying error messages
Used for creating week layout within the month
Used for formatting when there are no events
Used for formatting when there are no tasks
Used for formatting an event
Used for formatting an all day event
Used for formatting a task
Used for formatting the week view with a month
Used for generating the entire month layout
Used to show number of events
Used to show number of tasks
Used for formatting number of total and unread messages
Used for formatting header for week view
Used for formatting an empty event list
Used for formatting an empty task list
Used for formatting an event
Used for formatting an all day event
Used for formatting a task
Used for the overall week view
Used for overall channel formatting
Used for creating edit page checkboxes
Edit config options template
Used for creating end of the edit page
Used for creating application helper edit link
Used for creating edit page password boxes
Used for creating edit page select boxes
Used for creating edit page select box options
Edit separate template
Used for creating the start of the edit page
Used for creating edit page text boxes
Edit template
Used for creating hyperlinks
The templates available in the error subdirectory and their description are:
The banner across the top of the Desktop pages.
Banner non context template
Error template
Displayed when no context is available.
Template that will be used when there is an error in desktop when an edit page for a channel which is not editable is accessed. Displayed only when the user attempts to edit a channel which cannot be edited.
Template that will be used when there is an error in desktop when a user with no privilege to access the desktop is trying to access the desktop. Displayed when a user who doesn’t have the privilege to see the desktop attempts to access the desktop.
Template that will be used when there is an error in desktop when an undefined channel is being accessed. Displayed when the user is trying to access a channel which is not defined in the system.
The templates available in the LoginProvider subdirectory and their description are:
Contains the JavaScript code that launches the login window.
Contains the JavaScript code that launches the LDAP login window.
Contains the JavaScript code that launches the UNIX login window.
Library login template.
Partial HTML template for remembering the user’s name and password.
The templates available in the default directory and their description are:
Handles reattaching a detached channel.
The banner across the top of the Desktop pages
Content bar for template displayed on the Desktop before the user selects Content or Layout.
Handles detaching a channel.
Handles link to the Edit page for the detached channel.
Handles closing or removing a detached channel.
Handles link to the Edit page for this channel.
Generates the help URL for each of the channels. Displays the help contents in a new window.
Inline error template.
Allows the channel to be displayed in the maximize mode so that the channel occupies the entire Desktop.
HTML for the menubar across the bottom of the Desktop pages.
Allows the channel to be displayed in the minimize mode so that only the title bar of the channel is displayed and no content of the channel is displayed.
Handles minimizing and maximizing a channel.
Allows the channel to be displayed in the normal mode so that the channel is displayed in the Desktop, with all other channels in the same table container.
Commands available in title bar.
Redirect template.
Removes the channel.
JavaScript code used to select and display bullet color.
Is page completely loaded.
JavaScript to open a URL in the parent window. Used in popup windows.
Page loaded.
JavaScript code use to display selection of Content or Layout by color change.
This chapter contains the following sections:
PredefinedFrontPageTemplatePanelContainerProvider and PredefinedSamplesTemplatePanelContainerProvider
SamplesTemplatePanelContainer and ToolsTemplatePanelContainer
developersample directory template files
The templates available in the MyFrontPageTemplatePanelContainer directory and their description are:
The banner across the top of the Desktop pages.
HTML for the menubar across the bottom of the Desktop pages, including the Edit, Layout, and Content pages, and containing Home, Help and Log Out links.
The templates available in the PredefinedFrontPageTemplatePanelContainerProvider directory and their description are:
The banner across the top of the Desktop pages.
Template for each provider wrapper with no titlebar.
Content bar for template displayed when a user selects Content on any other page’s Content bar.
Content bar for template displayed when user selects Layout on any other page’s Content bar.
Content bar for template displayed on the Desktop before the user selects Content or Layout.
The HTML template for the Content (Channels) page that displays when a user selects Content.
left/thin, right/wide.
left/wide, right/thin.
left/thin, center/wide, right/thin.
left/thin, center/thin, right/thin.
Partial HTML template for Layout pages when the user has a full width channel available at the bottom of the layout.
Partial HTML template for Layout pages when the user has a full width channel available at the top of the layout.
Template of a provider when it’s in its maximized state.
HTML for the menubar across the bottom of the Desktop pages, including the Edit, Layout, and Content pages and containing Home, Help and Log Out links.
Template of a provider when it’s in its minimized state - just the title/button bar showing, no content area showing.
Template for the Options page of the Desktop.
Menubar to be used in popup windows.
Used to show provider/channel content in detached windows. Similar use to providerWrapper.template, but not in a table structure.
Template that all providers and channels use for layout on Desktop. Defines the look of the border of the providers and channels on the screen.
The base Desktop layout structure document. Very little in this file, as most of the content of the Desktop is swapped in during processing in the servlets.
JavaScript code used in the Desktop Layout page.
JavaScript code to launch a popup window.
JavaScript code used on the Layout page.
JavaScript code used on the Layout page.
JavaScript code used to remove a channel from the Desktop.
JavaScript code used on the Layout page.
JavaScript code used on the Layout page.
The templates available in the PredefinedFrontPageTemplatePanelContainerProvider directory and their description are:
The banner across the top of the Desktop pages.
Template for each provider wrapper with no titlebar.
Content bar for template displayed when a user selects Content on any other page’s Content bar.
Content bar for template displayed when user selects Layout on any other page’s Content bar.
Content bar for template displayed on the Desktop before the user selects Content or Layout.
The HTML template for the Content (Channels) page that displays when a user selects Content.
left/thin, right/wide.
left/wide, right/thin.
left/thin, center/wide, right/thin.
left/thin, center/thin, right/thin.
Partial HTML template for Layout pages when the user has a full width channel available at the bottom of the layout.
Partial HTML template for Layout pages when the user has a full width channel available at the top of the layout
Template of a provider when it’s in its maximized state.
HTML for the menubar across the bottom of the Desktop pages, including the Edit, Layout, and Content pages, and containing Home, Help and Log Out links.
Template of a provider when it’s in its minimized state - just the title/button bar are displayed and no content area is displayed.
Template for the Options page of the Desktop.
Menubar to be used in popup windows.
Used to show provider/channel content in detached windows. Similar use to providerWrapper.template, but not in a table structure.
Template that all providers and channels use for layout on Desktop. Defines the look of the border of the providers and channels on the screen.
The base Desktop layout structure document. Very little in this file, as most of the content of the Desktop is swapped in during processing in the servlets.
JavaScript code to launch a popup window.
JavaScript code used on the Layout page.
JavaScript code used on the Layout page.
JavaScript code used to remove a channel from the Desktop.
JavaScript code used on the Layout page.
JavaScript code used on the Layout page.
The templates available in the SamplesTemplatePanelContainer directory and their description are:
The banner across the top of the Desktop pages.
HTML for the menubar across the bottom of the Desktop pages, including the Edit, Layout, and Content pages, and containing Home, Help and Log Out links.
The templates available in the ToolsTemplatePanelContainer directory and their description are:
The banner across the top of the Desktop pages.
HTML for the menubar across the bottom of the Desktop pages, including the Edit, Layout, and Content pages, and containing Home, Help and Log Out links.
The templates available in the developersample directory and their description are:
Handles reattaching a detached channel.
Allows the channel to be displayed in the maximize mode so that the channel occupies the entire Desktop.
Handles link to the Edit page for the detached channel.
Handles detaching a channel.
Handles closing or removing a detached channel.
Handles link to the Edit page for the detached channel.
Generates the help URL for each of the channels. Displays the help contents in a new window.
Allows the channel to be displayed in the minimize mode so that only the title bar of the channel is displayed and no content of the channel is displayed.
Allows the channel to be displayed in the normal mode so that the channel is displayed in the Desktop, with all other channels in the same table container.
Removes the channel.
This chapter contains the following sections to explain the integration of Portal Server product and Java Enterprise System Monitoring Framework (JESMF):
JESMF is a Java Enterprise System (JES) common component that provides a single view of all the elements that compromise the JES stack. JESMF aims to simplify business by providing a single, consistent, qualified (Information relating to each component product is always equivalent. For example, a state of DEGRADED has the same meaning for every component product), relational (all the components in the monitored stack are interrelated) , and actionable (rather than simply regularly polling different monitored components to obtain information about them, it is sent by the component products only when action is required) service-oriented monitoring model for all JES components thereby providing information about the performance and status of the various JES component products in the stack.
JESMF follows a Common Information Model (CIM) - based monitoring model, improves usability, and adds support for existing CP metrics, and SNMP exposure of well known MIBs. It also implements Lockhart based JES Monitoring Console (JESMC) application on top of the infrastructure software that allows users to view monitored data.
JES Monitoring Console helps visualizing JES component products monitored data exposed by JESMF. JESMC provides JES end users with a clear view of how their JES stack is performing and to provide them the means to take action appropriately. The data collected by JESMF is made available to such industry standard management applications as HP Open View, Tivoli or Solaris Management Agent.
The JESMC is a Lockhart based GUI. When the Monitoring Console and Lockhart are installed on your system, you can view the console by entering the following URL into the browser:
https://host_name:6789 where the host_name represents the name or IP address of the machine on which Lockhart and JESMF are running. Port number 6789 is the officially registered port reserved for Lockhart.
The Monitoring Console exposes the following through various data views:
Hierarchy of the monitored objects implemented in the JES Core Information Base.
Usage relationships (a component product may depend on other product services).
Operational status and availability status of the monitored objects.
Performance statistics of the monitored objects.
The JESMC operates within real-time (given the inherent refresh restrictions of a browser). As a host is added to the scope of the console, installed and running JES component products are automatically discovered. As Component Products are discovered, the monitored objects that represent these products are visualized within the console. When the user refreshes the browser, the current JES installation and associated statistics are reflected in the console.
The Monitoring Console allows the user to set threshold values on any monitored object by creating a Monitoring Rule. An alarm is generated when a threshold value is crossed.
The JESMC is not a management console. No administrative commands, other than creating monitoring rules are possible.
In particular, the Console does not:
Permit administrative operations on the monitored products.
Provide a link to the admin console of the product.
Provide the ability to browse or analyze any of the gathered job results.
The Monitoring Console is composed of two elements:
A web application integrated into the Lockhart console and based on the Lockhart components.
The client API runs on the same host as the JESMF Master Agent and provides a simple and efficient way to access JESMF data. Both the elements communicate using the JMX technology. The client API is an internal API that is not exposed to users of the console or users of JESMF. The client API is a Mbean instantiated in the Mbean server in which the MA is running.
Users expect JES to deliver an integrated management and monitoring system, which deliver the services they need in a reliable and predictable manner. The JESMF is a major step toward achieving this.
The benefits expected from JESMF architecture are:
Dynamic Adaptability: JMX monitoring agents can support new monitoring service types for dynamically created services.
Easy to Integrate with legacy systems through protocol adapters and connectors.
Low Cost: JMX manageability can be readily implemented in software products without having to pay the learning curve cost of complex system management technologies and information models.
For more information JESMF and JESMC, refer the Sun Java Enterprise System 5 Monitoring Guide in http://docs.sun.com.
Common agent container is a stand alone Java program that implements a container for Java management applications. Common agent container provides a management infrastructure designed for JMX and JDMK - based management functionality. Common agent container is designed to accept modules that extend an existing JMX or JDMK agent with new managed objects, connectors, or new functionality.
The Portal Server JESMF integration adds a common agent container module for itself.
This section provides a list of attributes, which are used to map the Portal Server and JESMF.
The JESMF extensions for Portal Server product are:
CMM_PSRollingAvgServiceStats extends CMM_ServiceStats with the following two additional metrics:
Table 72–10 CMM_PSRollingAvgServiceStats
RollingAvgServiceTime |
Rolling average of ServiceTime property of CMM_ServiceStats. |
RollingAvgResidentTime |
Rolling average of ResidentTime property of CMM_ServiceStats. |
CMM_PSRollingAvgServiceStats works with CMM_PSRollingAvgServiceSetting. CMM_PSRollingAvgServiceSetting extends CMM_ServiceSetting with the following two additional properties that help managing CMM_PSRollingAvgServiceStats:
Table 72–11 CMM_PSRollingAvgServiceStats
LowerBound |
Minimum number of service requests after which rolling average metric comes into effect. Prior to LowerBound number of service requests, rolling average is a simple average. Default value is 100. |
UpperBound |
Number of service requests whose service or resident time is considered when calculating rolling average. Default value is 1000. |
In JES 5, the installation and configuration of Portal Server:JESMF integration occurs by default. If you need to upgrade the system to JES 5, then you require to install and configure. This section explains about how you can install and configure Portal Server:JESMF Integration.
PS:JESMF Integration depends on three JES shared components:
Jdmk5.1-patch1
Cacao2.0
JESMF2.0
These shared components are part of JES 5. JES 4 supported earlier versions such as Jdmk5.1, Cacao1.1, and JESMF1.0. Use these components if you use JES 4. While upgrade, you need to first upgrade the shared components to JES 5 and then enable Portal Server:JESMF Integration.
For upgrade or migration, when Cacao2.0 or JESMF2.0 is not installed, then Portal Server:JESMF Integration should be disabled. This means that no configuration should happen for Portal Server:JESMF Integration.
These are high level requirements to configure Portal Server:JESMF Integration:
Copy /opt/SUNWportal/template/jesmf/com.sun.cmm.ps.xml to /tmp, and change the following tokens:
%ps.product.location%
%PRODUCT_VERSION%
%ps.install.datetime%
Register JESMF 2.0 module using com.sun.cmm.ps.xml from <baseDir>/template/jesmf/com.sun.cmm.ps.xml. Following tokens should be replaced with correct values at config time in this file:
InstallLocation should be set to install directory of portal. For example, on Solaris with default install location as /opt.
InstalledDate should be set to current system time of configuration. For example, System.currentTimeMillis() value should be dumped as token value.
You need to use “<jesmfInstallDir>/bin/mfwksetup -r <path_to_com.sun.cmm.ps.xml>” to register Portal Server:JESMF common agent container module. This should happen only for the first instance for any portal getting created on this Operating System (OS) node. There is only one Portal Server:JESMF common agent container 2.0 module on one OS node.
Check the web containers configuration to see if this jar (and jdmkrt.jar) is present in the server classpath. If it is not present, add it to web containers server classpath.
Copy desktopmfwk.properties to /var/opt/SUNWportal/portals/<portalid>config/<instanceId> form <baseDir>/template/jesmf/desktopmfwk.properties.
In the desktopmfwk.properties file, replace the %PS_DIR% token with install location. For example, /opt/SUNWportal on Solaris.
The Portal Server:JESMF Integration unconfiguration happens when a portal server instance is deleted from an OS-node. These are high level requirements to unconfigure Portal Server:JESMF Integration:
Whenever a portal server instance (portal web-application) is deleted on an OS-node, delete /var/opt/SUNWportal/portals/<portalId>/config/<instanceId>/desktopmfwk.properties.
If this is the last portal server instance of the last portal being deleted on this OS-node, unregister PS:JESMF Integration common agent container module using "<jesmfInstallDir>/bin/mfwksetup -u <path_to_com.sun.cmm.ps.xml>”.
This section explains how to enable or disable Portal Server:JESMF integration.
Set the com.sun.portal.mfwk.disable property in desktopmfwk.properties to “False”.
Restart Portal Server to make the changes take effect.