Hi my fellow WebSpherians
Don't forget to visit the WebSphere Application Server version 8 and 8.5 training labs.
Attached the URLS :
http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.was_v8/was/8.0/Labs.html
http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.was_v8/was/8.5/Labs.html
Your in WebSphere
Jerome
Thursday, October 31, 2013
Thursday, October 24, 2013
Caching Issue in WebSphere Portal version 6.1, 7.0 and 8.0
Currently Committed database setting - Applies to DB2 v9.7 or higher and WebSphere Portal version 6.1 and 7.0
DB2 V9.7 introduced a new default behaviour for isolation level cursor stability (CS) (see http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.config.doc/doc/r0053556.html).
In WebSphere Portal this has implications for the cache invalidation strategy related to transactions. The new DB2 default behaviour for isolation level cursor stability (CS) is to NOT block code that wants to read data which is still being worked on in an uncommitted transaction in another thread (DB2 returns the result, as if the other transaction would not exist). But WebSphere Portal version 6.1 and 7.0 cache invalidation and refill strategies rely on the blocking at database level. With the new 'currently committed' default setting, stale data in Portal caches can occur.
Starting with Portal version 8.0 the setting of CUR_COMMIT to ENABLED is supported.
Besides the fact that CUR_COMMIT must be set to DISABLED for WebSphere Portal version 6.1 and 7.0, WebSphere Portal development does not expect a performance degradation when changing the value of CUR_COMMIT from ENABLED to DISABLED. For some scenarios with long database transactions, it could be that response times increase due to additional waits for updated data.
The setting of CUR_COMMIT is applied at database level. Therefore it is required to set CUR_COMMIT to DISABLED for the Portal database(s), containing the Portal database domains release, community, customization, jcr, feedback, and likeminds.
Disabling CUR_COMMIT in DB2 Version 9.7:
Ask your DB2 administrator to ensure that CUR_COMMIT is disabled by carrying out the following steps (for each of the Portal databases):
In WebSphere Portal this has implications for the cache invalidation strategy related to transactions. The new DB2 default behaviour for isolation level cursor stability (CS) is to NOT block code that wants to read data which is still being worked on in an uncommitted transaction in another thread (DB2 returns the result, as if the other transaction would not exist). But WebSphere Portal version 6.1 and 7.0 cache invalidation and refill strategies rely on the blocking at database level. With the new 'currently committed' default setting, stale data in Portal caches can occur.
Starting with Portal version 8.0 the setting of CUR_COMMIT to ENABLED is supported.
Besides the fact that CUR_COMMIT must be set to DISABLED for WebSphere Portal version 6.1 and 7.0, WebSphere Portal development does not expect a performance degradation when changing the value of CUR_COMMIT from ENABLED to DISABLED. For some scenarios with long database transactions, it could be that response times increase due to additional waits for updated data.
The setting of CUR_COMMIT is applied at database level. Therefore it is required to set CUR_COMMIT to DISABLED for the Portal database(s), containing the Portal database domains release, community, customization, jcr, feedback, and likeminds.
Disabling CUR_COMMIT in DB2 Version 9.7:
Ask your DB2 administrator to ensure that CUR_COMMIT is disabled by carrying out the following steps (for each of the Portal databases):
- Connect to the runtime database:
$ db2 connect to
whererepresents the name of the database.
- List the CUR_COMMIT parameter:
$ db2 get db cfg show detail | grep CUR_COMMIT
The output should look like this:
Currently Committed (CUR_COMMIT) = DISABLED DISABLED
- If the values are anything other than two times DISABLED (one
for the current setting used, the other for the delayed setting
specified in the configuration), change the value to DISABLED:
$ db2 update db cfg using CUR_COMMIT DISABLED
- Close the database connection:
$ db2 connect reset
- Check that no other application is connected to the database,to
make the change effective (This e.g. requires to stop the Websphere
Portal Server that uses the database). List the connected applications
like this:
$ db2 list applications for db where
represents the name of the database.
The output should look like this:
SQL1611W No data was returned by Database System Monitor.
- Ensure that the settings are correct by repeating the steps 1. and 2.
Friday, October 11, 2013
Migration to an empty Portal 6.1.x will not work.
Hi All
I am posting this in reply to so many questions that came in surrounding migration.
Please note that you can experience this in 7.0 and 8.0.
Technote (FAQ)
Question
One is often drawn into a speculation that migration onto an empty portal will work. Migration to an empty portal will not work.
Answer
Migration to an empty portal will often fail
because of various reasons. The empty portal typically contains a few
content-nodes, application roles and certain other virtual resources and
no other portal artifacts like portlets, pages, themes, skins. The
migration scripts are typically looking for these artifacts to do the
migration. And hence the failure.
Source : http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg21383211
Tuesday, October 8, 2013
Wpcollector tool, new in WebSphere Portal 7.0 and 8.0
Wpcollector is a new command line tool that
automates the collection of portal logs and configuration files and
optionally assists the customer with sending those files to IBM Support,
saving valuable time. Using automated log collection early in the PMR
life cycle can greatly reduce the number of doc requests that are made
by Support. Wpcollector is an excellent tool for those customers that
are not able to download and install ISA Lite in their portal
environment.
Wpcollector is delivered with WebSphere Portal beginning with the 7.0 release. A significant difference between wpcollector and ISA Lite is that ISA Lite will automatically enable the correct traceString and collect the appropriate files based on the problem type selected in the ISA Lite GUI. Wpcollector, however, does not currently have a mechanism for the user to specify the problem type. Therefore, if tracing is required for the problem, the customer must manually enable traceStrings and recreate the problem PRIOR to running wpcollector. Similarly, because wpcollector consists of only 1 script, it collects all of the files for all of the various problem types each time the tool is run.
To run wpcollector, please follow the steps, below:
- If IBM Support has requested tracing, enable it as instructed by the L2 Support Engineer and then recreate the problem. If no tracing is requested, proceed to the step, below:
- If using Microsoft Windows, Unix/Linux, or IBM i, run the following script from the
/PortalServer/bin/ directory to begin the collection:
Windows: wpcollector.batUnix/Linux: wpcollector.shi: wpcollector.shTip: To specify the option for automatically sending the collection to IBM Support via FTP, use the "pmr" parameter. This will associate the collection with the PMR (Problem Management Record) specified. Be sure to format the number using either periods or commas. For example:wpcollector.bat -Dpmr=nnnnn.bbb.ccc (nnnnn=PMR number, bbb=branch, ccc=country code)Tip: To specify the option for collecting files for the Deployment Manager profile, use the "dmgr.root" parameter. For example:wpcollector.bat -Ddmgr.root=/opt/IBM/WebSphere/profiles/dmgr_profile - If using IBM z/OS, proceed as follows:
Start the WebSphere Portal Customization Dialog.In the Portal configuration panel, select Collect Diagnostics.Follow the Customization Dialog instructions for submitting the Collect Diagnostics job (EJPSLOGS).Tip: To specify the option for automatically sending the collection to IBM Support via FTP, respond to the "Transmit PMR Data" prompt with "Y" in the ISPF panel as follows:Transmit PMR data to IBM .................................: YTip: To collect data from the Deployment Manager, the only requirement is to submit the job from the system where the Deployment Manager is installed (i.e. so it can access the files). There is no prompt in the ISPF panel for this. - If the automatic send/FTP option was not specified, a manual
transfer of the collection to IBM will be necessary. Locate the
wp.mustgather-
.zip file or the -wp.mustgather- .zip file in the <wp_profile_root>/filesForAutoPD/ directory and follow the instructions in "Exchanging information with IBM Technical Support for problem determination" to manually FTP the collection to IBM. If using z/OS, there may be additional z/OS-specific files required, such as WebSphere Portal servant region or controller region joblogs. Wpcollector currently does not collect these files. Your L2 Support Engineer will inform you in the event these files are needed and provide instructions for collecting them.
Happy Trails
Jerome Slinger
Friday, October 4, 2013
Installing WebSphere Application Server Version 8 or later
Before you begin
About this task
Procedure
- If Rational Software Architect is running, stop the software.
- Depending on your user ID, complete one of the following
steps:
- If you are installing as an Admin:
- Start the launchpad.
- Click Install IBM Rational Software Architect.
- If you are installing as a non-Admin: Start the installation from the Setup disk by running the userinst program.
- If you are installing as an Admin:
- Install or update IBM Installation
Manager.
- On the first page of the Install Packages wizard, click Check for Other Versions and Extensions to install the latest available version. If a newer version is available, it is automatically selected for installation. Click Next.
- On the Licenses page, read the license agreements for IBM Installation Manager. If you agree to the terms of all of the license agreements, click I accept the terms in the license agreements and then click Next.
- If Installation Manager is not already installed: On the location page, in the Installation Manager Directory field, type the path type the path for the directory where you want to install Installation Manager or accept the default path and then click Next.
- On the Summary page, review your choices before starting the installation process. If you want to change your selections, click Back to return to the previous pages. When you are satisfied with your selections, click Install.
- When the installation process completes, click Restart Installation Manager. Installation Manager closes and restarts.
- In the IBM Installation Manager window, click Install. The Install Packages wizard opens.
- On the first page of the Install Packages wizard, select Application Server 8.0.0.0 and then click Next.
- You can install updates at the same time that you install the base product package. To search for updates to the packages, click Check for Other Versions and Extensions. Installation Manager searches for updates at the predefined IBM update repository for the product package. It also searches any repository locations that you have set.
- To learn more about the packages that you can install, click the package name. A description of the package is displayed in the Details pane. If additional information about the package is available, a More info link is included at the end of the description text. Click the link to display the additional information in a browser.
- Click Next.
- On the Licenses page, read the license agreements for the
selected packages. On the left-hand side of the License page,
click each package version to display its license agreement.
- If you agree to the terms of all of the license agreements, click I accept the terms of the license agreements.
- Click Next to continue.
- Depending on whether you have already used Installation
Manager to install software, you might have to select the shared resources
directory on the Location page. Type the path for the in the Shared
Resources Directory field, or accept the default path
and then click Next to continue. If you are
installing on Linux, ensure that you do not include any spaces
in the directory path. The shared resources directory contains resources
that can be shared by one or more package groups. Important: You can specify the shared resources directory only at the time that install Installation Manager. Use your disk with the most available space for this to help ensure adequate space for the shared resources of future packages. You cannot change the directory location unless you uninstall all packages.
- On the Location page, type the path for the installation
directory for the package group and then click Next. (If
you are installing on Linux, ensure that you do not include
any spaces in the directory path.) The name for the
package group is created automatically. Important: If you are installing as with a non-Admin user ID on Microsoft Windows Vista, Windows 7, or Windows Server 2008: You must choose an installation location the product that is not in the Program Files path (C:\Program Files) if you want to be able to run the application as a non-Admin user.
If you select an installation directory that is in the Program Files path, then you must run the application as the administrator. To run as administrator, right-click the program shortcut and click Run as administrator. - On the Features page, select the features that you want to install. Click the feature to see more information about it in the Details section of the page. When you are finished, click Next.
- On the Summary page, review your choices before installing the product package. If you want to change the choices that you made on previous pages, click Back, and make your changes. When you are satisfied with your installation choices, click Install to install the package. A progress indicator shows the percentage of the installation completed.
- When the installation process completes, select to star Profile Management Tool and then click Finish.
What to do next
- Create a developer profile for WebSphere Application Server, version 8.0.
- If not installed already, install IBM Rational Software Architect, version 8.0. Ensure that you select the WebSphere Application Server, version 8.0 development tools feature.
Friday, July 19, 2013
IBM WebSphere Portal ConfigEngine Tasks
action-deploy-portlets-prereq.pzn
If you install Portal or WCM using the administration option, or base install, the Personalization features, including the Personalization Navigator and Personalization Editor, are not installed. However, you can add these features manually after installation by deploying the Personalization portlets and adding the Personalization Navigator and Personalization Editor to a page. This task deploys the personalization portlets.Examples:
UNIX:
./ConfigEngine.sh action-deploy-portlets-prereq.pzn -DPortalAdminPwd=password -DWasPassword=password |
Windows:
ConfigEngine.bat action-deploy-portlets-prereq.pzn -DPortalAdminPwd=password -DWasPassword=password |
i5/OS:
ConfigEngine.sh action-deploy-portlets-prereq.pzn -DPortalAdminPwd=password -DWasPassword=password |
activate-portlets
Auto-synchronization of the Web modules to each node in the cluster might not happen immediately, or at all, depending on how the administrator has auto-synchronization configured in the deployment manager. For this reason, WebSphere Portal cannot guarantee that the portlet has been successfully synchronized to each node in the cluster and thus cannot automatically activate the portlet during deployment.Perform the following steps to manage your portlets:
Deploy your portlets using either the WebSphere Portal Administration page or the XML configuration interface utility (xmlaccess command).
Run this task to activate the deployed portlets and to synchronize the changes across all cluster members.
Example:
ConfigEngine.bat activate-portlets -DWasPassword=password task from the wp_profile_rootConfigEngine directory |
add-wcm-la-attributes
Adds the look-aside (property extension) database attributes necessary for WCM. You have to create the look-aside database first. See: http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Configuring_a_property_extension_database_on_Windows_wp7. Example command:ConfigEngine.bat
add-wcm-la-attributes -DWasPassword=password -DparentProperties=full
path to
wp_profile_root\\ConfigEngine\\config\\helpers\\wp_add_LA.properties |
checkin-wp-proxy-config
This task activates changes made to the WebSphere Portal Ajax proxy configuration (wp.proxy.config.xml) file.Example:
ConfigEngine.sh|bat checkin-wp-proxy-config -DProxyConfigFileName=dir_path/your_updated_proxy_file.name |
cluster-node-config-cluster-setup
Example:ConfigEngine.bat cluster-node-config-cluster-setup -DWasPassword=wpsadmin |
create-jcr-jms-resources-post-dbxfer
The Java Content Repository (JCR) TextSearch functions are used for searching for content in the Lotus Web Content Management (WCM) Authoring user interface.As part of the install of IBM WebSphere Portal V7.0, all environments should be running the JMS task, "create-jcr-jms-resources-post-dbxfer," to move the JCR TextSearch resources from an Apache Derby Datasource/database configuration to the Datasouce/database that is used for the JCR repository. Failure to run this task can leave the datasource definitions pointing to Derby or cause the JCR TextSearch to not function properly.Example:
create-jcr-jms-resources-post-dbxfer -DWasPassword=replaceWithWasPassword |
configure-wcm-authoring
Installs the Web Content Management Authoring Portlet, Local Rendering Portlet and Web Content Manager Portal pages. This task can be run, for example, to install WCM atop a base portal install if the licensed edition allows for use of WCM.Example:
ConfigEngine.bat configure-wcm-authoring -DPortalAdminPwd=xxx -DWasPassword=xxx |
create-virtual-portal
Use this task to create a virtual portal. Additional parameters can be passed to the task, so please refer to the Virtual portals reference for details.create-jcr-jmstopics
Recreates the bus and bus member used for JCR text search functionality.database-transfer
Transfers the portal database from one to another depending on the settings in your configuration files (typically from the default Derby database to another such as DB2). You typically want to run the validate-database-driver and validate-database-connection tasks before this one.delete-virtual-portal
Use this task to delete a virtual portal by using its object ID. To determine the correct object ID of the virtual portal, use the task list-all-virtual-portals.deploy-full-profile-7002-theme
This config task applies the full profile to the WebSphere Portal7.0.0.2 theme.deploy-lightweight-profile-7002-theme
This config task applies the lightweight profile to the WebSphere Portal7.0.0.2 themedeploy-deferred-profile-7002-theme
This config task applies the deferred profile to the WebSphere Portal7.0.0.2 theme.enable-identityprovider-tai
Enables a Trust Association Interceptor (TAI) for allowing OpenID authentication with an identity provider such as Google, Yahoo, or Facebook.AIX:
./ConfigEngine.sh enable-identityprovider-tai -DWasUserId=username -DWasPassword=password |
IBM® i:
ConfigEngine.sh enable-identityprovider-tai -DWasUserId=username -DWasPassword=password |
Linux:
./ConfigEngine.sh enable-identityprovider-tai -DWasUserId=username -DWasPassword=password |
Solaris:
./ConfigEngine.sh enable-identityprovider-tai -DWasUserId=username -DWasPassword=password |
Windows:
ConfigEngine.bat enable-identityprovider-tai -DWasUserId=username -DWasPassword=password |
enable-profiles
This command creates a configuration archive (CAR) file that is used to create additional WebSphere Portal profiles. The Portal.car file is saved to the PortalServer_rootprofileTemplates
default.portal
configArchives directory. This is typically done as a step in the process of creating the WebSphere Portal profile template in a clustered environment.
enable-wcm
Installs Web Content Manager into an existing Server installation. In a clustered environment, this must be executed on each node.See: Installing Web Content Manager into an existing Server installation on Windows
export-library-copy
Exports a copy of a web content library. See: Exporting and importing a web content library copyexport-wcm-data
Exports a web content library. Several things need to be in place for this task to be executed properly, so please refer to: Exporting and importing web content librariesimport-library-copy
Imports a copy of a web content library. See: Exporting and importing a web content library copyimport-wcm-data
Imports a web content library. Several things need to be in place for this task to be executed properly, so please refer to: Exporting and importing web content librarieslist-all-virtual-portals
This tasks lists all your virtual portals, together with the following information:- The title of the virtual portal
- The description of the virtual portal
- The realm of the virtual portal
- The object ID of the virtual portal.
list-server-ports
Example:ConfigEngine.bat list-server-ports -DWasPassword=password |
list-server-ports-by-name
Examples:ConfigEngine.bat list-server-ports-by-name -DServerName=server1 -DWasPassword=password |
ConfigEngine.bat list-server-ports-by-name -DServerName=WebSphere_Portal -DWasPassword=password |
modify-servlet-path
Changes the default portal Uniform Resource Identifier (URI) after installation.Example:
./ConfigEngine.sh modify-servlet-path -DPortalAdminPwd=password -DWasPassword=password |
Note that additional steps are typically required. See the topic, Changing the portal URI, in the appropriate product documentation for your software version.
modify-virtual-portal
Use this task to modify a virtual portal by using its object ID. To determine the correct object ID of the virtual portal, use the task list-all-virtual-portals .package-profiles
Zips the profileTemplates directory and creates a profileTemplates.zip file in the PortalServer_root/profileTemplates directory. This is typically done after the enable-profiles task as a step in the process of creating the WebSphere Portal profile template in a clustered environment.remove-wcm-authoring
Uninstalls the Web Content Management Authoring Portlet, Local Rendering Portlet and Web Content Manager Portal pages.run-wcm-admin-task-member-fixer
Creates a report of users or groups referenced in Web Content Manager items that need fixing. See product documentation: Using the web content member fixer taskExample:
ConfigEngine.bat
run-wcm-admin-task-member-fixer -DPortalAdminId=username
-DPortalAdminPwd=password -DWasUserId=username -DWasPassword=password
-Dlibrary= "MyLibrary" |
ConfigEngine.bat
run-wcm-admin-task-member-fixer -DPortalAdminId=username
-DPortalAdminPwd=password -DWasUserId=username -DWasPassword=password
-Dlibrary= "MyLibrary" -Dfix= true |
si-remove-setup
Removes the Solution Installer PAAs and their registrations as part of the uninstallation procedure for the IBM WebSphere Portal Solution Installer. For more information, refer to the official documentation for the Solution Installer, which is a PDF file contained within the application that can be obtained from the IBM Lotus and WebSphere Portal Business Solutions Catalog. See also: si-setup.si-setup
This task is executed as a part of the installation procedure for the IBM WebSphere Portal Solution Installer. After the SolutionInstaller.zip has extracted on a node, and the install script has been run, this task is then executed to set up and register the PAA offering directory that the Solution Installer uses. For more information, refer to the official documentation for the Solution Installer, which is a PDF file contained within the application that can be obtained from the IBM Lotus and WebSphere Portal Business Solutions Catalog. See also: si-remove-setup.start-portal-server
Starts the portal server. Note that the portal admin user id and password should be set in wkplc.properties before executing this task.Example:
./ConfigEngine.sh start-portal-server |
stop-portal-server
Stops the portal server. Note that the portal admin user id and password should be set in wkplc.properties before executing this task.Example:
./ConfigEngine.sh stop-portal-server |
validate-database-connection
Typically ran after the validate-database-driver task and before the database-transfer task to validate successful connection to database.Example:
ConfigEngine.bat validate-database-connection -DTransferDomainList=release,customization,community,jcr,feedback,likeminds |
validate-database-driver
Typically ran before the database-transfer task to validate your database driver configuration.Example:
ConfigEngine.bat validate-database-driver -DTransferDomainList=release,customization,community, jcr,feedback,likeminds |
Example:
ConfigEngine.bat validate-standalone-ldap -DWasPassword=wpsadmin -DparentProperties=Z:\helpers\wp_security_ids.properties |
webdav-deploy-zip-file
Use this configuration task to manage theme artifacts and to deploy iWidgets. This task uploads archive or compressed files to portal WebDAV folders.This task has parameters; please see IBM documentation: Task webdav-deploy-zip-file
wp-node-prep-vmm-db-secured-environment
wp-prep-vmm-db-secured-environment
wp-query-attribute-config
Run the ConfigEngine.bat wp-query-attribute-config -DWasPassword=password task, from the wp_profile_root/ConfigEngine directory, any time during the configuration process or at runtime to query an overview of the currently defined LDAP attributes. This task creates the availableAttributes.html report, located in the wp_profile_root/ConfigEngine/log directory. The report contains one table that lists the available attributes for Users (PersonAccount) and one table that lists the available attributes for Groups. For each configured repository there is a column that indicates if the attribute is flagged as unsupported or if the attribute is mapped to a different LDAP attribute.wp-query-repository
Lists the names and types of configured user repositories.wp-update-standalone-ldap-attribute-config
Applies the settings from wkplc.properties related to marking LDAP attributes as unsupported or mapping the portal attributes to attributes in your LDAP. For example, you might need to map the "ibm-primaryEmail" attribute that portal uses to the "mail" attribute in your own LDAP.See: http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Mapping_attributes_on_Windows_in_a_clustered_environment_wp7. This task may do more, but at the time I wrote this, it was documented in this particular context.
wp-validate-federated-ldap-attribute-config
Validates that all defined attributes are available in the configured LDAP user registry.Source : https://wiki.base22.com/
Monday, July 8, 2013
WCM page and authoring portlet may not display after migration
Greetings Fellow WebSpherians
I am posting this one in response to a few queries that were mailed to me and here's to it being helpful :
1. Make sure that the page on which the WCM authoring portlet is installed uses a theme with client-side rendering such as the Page Builder theme.
2. Deploy the hidden Portal page on which the reserved authoring portlet is installed.
3. Run the following task from the
wp_profile_root
/
Config Engine directory.
I am posting this one in response to a few queries that were mailed to me and here's to it being helpful :
After migrating to IBM WebSphere Portal V7.0, you
may not be able to navigate to or display the Web Content Manager (WCM)
out-of-box page or the authoring portlet. In addition, some related
functions in the user interface might not work or might generate
exceptions when accessed. Clicking buttons in the authoring portlet may
generate the following error in the log:
- IWKAP0009E: Servlet not enabled.
Cause
The migration process can disable some new
out-of-the-box features if the feature did not exist in the previous
release or if it was updated. In particular, the Portal page required
for the reserved authoring portlet is missing and the permissions on the
AJAX proxy servlet are not set correctly.
Resolving the problem
To re-enable the affected features manually after migration, do the following:
1. Make sure that the page on which the WCM authoring portlet is installed uses a theme with client-side rendering such as the Page Builder theme.
2. Deploy the hidden Portal page on which the reserved authoring portlet is installed.
- Cluster note: Run this task on the primary node in a V7 clustered environment.
- Windows:
ConfigEngine.bat install-wcm-hidden-authoring-page -DWasPassword=password
UNIX:
./ConfigEngine.sh install-wcm-hidden-authoring-page -DWasPassword=password
i/System:
ConfigEngine.sh install-wcm-hidden-authoring-page -DWasPassword=password
z/OS (run from the UNIX shell) :
./ConfigEngine.sh install-wcm-hidden-authoring-page -DWasPassword=password
Tuesday, February 26, 2013
Webserver Plugin configuration
How should I configure my web server plug-in for the best results ?
Cause
Some
users are confused about how the ServerIOTimeout setting affects how
the WebSphere web server plug-in handles failed requests. This document
is intended to clarify this confusion.
There are competing factors that should be considered when determining the appropriate WebSphere web server plug-in settings for your environment. There is no single configuration that is correct for all environments. Please consider the following facts when selecting the best values for your environment.
- Connections consume resources on both the machine where the plug-in is installed and the machine where the application server is installed.
- Connections that do not terminate do not free these resources and can exhaust the resource pool.
- Time-out values set too low cause the client to experience unnecessary failures and increase the traffic load if the request is retried.
- Heavy traffic and intermediate issues can cause unexpected delays in responses.
- When an application response is not received within the ServerIOTimeout specification, you can decide whether to continue to send requests to that server. If you continue to send requests to that server, you risk additional time-outs and failures if there is a problem on the machine. If you decide to halt requests to that server, you decrease your sites capacity.
- Requests that contain a message body and typically can change the application state, such as a POST request, should not be retried unless the application is designed to accept multiple instances of the same request.
- Requests, typically GET and HEAD requests, that do not contain a message body are automatically retried by the plug-in when failures occur and this functionality cannot be disabled. If you configure the plug-in to stop using a server if time out issues occur, you must adjust other settings to ensure a single request never disables your entire site.
There are competing factors that should be considered when determining the appropriate WebSphere web server plug-in settings for your environment. There is no single configuration that is correct for all environments. Please consider the following facts when selecting the best values for your environment.
- Connections consume resources on both the machine where the plug-in is installed and the machine where the application server is installed.
- Connections that do not terminate do not free these resources and can exhaust the resource pool.
- Time-out values set too low cause the client to experience unnecessary failures and increase the traffic load if the request is retried.
- Heavy traffic and intermediate issues can cause unexpected delays in responses.
- When an application response is not received within the ServerIOTimeout specification, you can decide whether to continue to send requests to that server. If you continue to send requests to that server, you risk additional time-outs and failures if there is a problem on the machine. If you decide to halt requests to that server, you decrease your sites capacity.
- Requests that contain a message body and typically can change the application state, such as a POST request, should not be retried unless the application is designed to accept multiple instances of the same request.
- Requests, typically GET and HEAD requests, that do not contain a message body are automatically retried by the plug-in when failures occur and this functionality cannot be disabled. If you configure the plug-in to stop using a server if time out issues occur, you must adjust other settings to ensure a single request never disables your entire site.
Answer
The
WebSphere web server plug-in has several settings that should be
examined when deciding how to best meet the needs of your clients.
The PostBufferSize property controls whether a request containing data, such as a POST request, will be retried to another server when failures and time-outs occur. By default, this property is set to 64K, which is the maximum content that can be buffered. If a request larger than this setting arrives, it will not be retried. Increasing the PostBufferSize property will consume more memory. As an alternative, you can disable the retry functionality of requests with content by setting the PostBufferSize property equal to 0, or you can set an unlimited buffer size by setting the PostBufferSize property to -1.
Requests that do not contain a body, such as GET requests, are automatically retried to another server whenever a failure or time-out occurs. This behavior cannot be disabled.
If a non-affinity request is retried, the plug-in will attempt to handle the request on each available server until a good response is received or each server has been tried. If an affinity request is retried and there is a positive ServerIOTimeout, affinity requests will be retried to the affinity appserver only. If there is a negative ServerIOTimeout, then the affinity server will be marked down and retries will be made to the remaining available servers.
The ServerIOTimeout property is designed to allow requests to time-out instead of waiting indefinitely for a response from the server. In Versions 6.1 and earlier, the ServerIOTimeout property defaults to 0, which indicates that there is no time limit for requests. This value is not recommended because if the a server never responds, the resources involved in this request might never be freed and eventually the resource pool is exhausted. In some cases, the operating system or adapter resources might break the connection because of inactivity but this is not behavior that should be relied on. You will need to determine the appropriate behavior for your environment if you plan to set the ServerIOTimeout property to 0.
If the ServerIOTimeout property is set to 0, do not expect requests to be retried. A request is not retried until the previous connection is broken and, as explained previously, the connection might not get broken. If you need to use the retry capabilities of the plug-in, either set the ServerIOTimeout property to a non-zero value, use the operating system settings, or use some other non-plug-in mechanism to ensure that you can guarantee that a connection is broken at some predetermined time.
With Version 7.0, the default value of the ServerIOTimeout property is 60 seconds. This might not be the ideal setting for applications running intensive queries or other nontrivial functions. The ServerIOTimeout value will need to be adjusted if you expect requests to take longer than 60 seconds to be served.
The ServerIOTimeout setting is based on how long the server takes to handle a request; not on a particular URI or application. Therefore, when specifying a value for this property, you should allow for the slowest, longest request time, and then add a little more time to handle peak operation situations.
When a request fails because the length of time it took to get a response exceeded the value specified for the ServerIOTimeout property, the server is NOT marked as down if the ServerIOTimeout property is set to a value >= 0. This is an important fact to keep in mind because this fact means that other requests will continue to be sent to this server. If you have affinity defined and this server is selected based on the request's previous session data, the same server will be selected if the request is retried because the server will still be available and matches the incoming affinity requirements. The actual number of times that the plug-in will attempt the request to the same server depends on the number of servers defined in the cluster. If the server is not healthy, sending requests back to the same server is not likely to result in a good response and might exasperate a potential performance problem.
Starting with Version 6.0.2.33, 6.1.0.23 and 7.0.0.3, if you do NOT want the same server selected for affinity requests that fail because of response time-outs or you would like to eliminate traffic from this server because it is not responding within your predefined response criteria, you should specify a negative value for the ServerIOTimeout property. When the value for the ServerIOTimeout property is negative, the plug-in marks the server down when a response time-out occurs. When the plug-in marks the server down, requests will not be sent to that server until the interval specified for the plug-in RetryInterval property expires. If there is only one server in the cluster, it is never marked down regardless of the plug-in properties.
Setting the ServerIOTimeout property to a negative value might have bad consequences if you set the time-out value too low. If you have a long running request that takes longer than the length of the time specified for the ServerIOTimeout property and that request is retried to other servers, the plug-in might mark every server in the cluster down as the request is retried to each server. Therefore, if you specify a negative value for the ServerIOTimeout property, you should ensure that the value specified for the RetryInterval property is within the range such that:
For example, if you set the ServerIOTimeout property to -5, and you have 3 servers in the cluster, the value specified for the RetryInterval property should be between 1 and 9. Specifying such a value guarantees that all of the servers are never marked down because of an unexpected intensive request. If your applications are designed such that a single request can have significant impact on the application server, such as an extensive query which might cause data locking until the query is complete, you should set the ServerIOTimeout property to a very large value, such as 18000 ( 5 hours). If you have selected to mark servers down whenever time-out failures occur, set the RetryInterval to the a value in the minimum recommended range to avoid removing the server from processing requests for a long period of time.
Examples :
The following example illustrates a non-recommended configuration and the potential problem that could arise :
There are 3 servers in the cluster.
The RetryInterval property is set to the default value of 60 seconds.
The ServerIOTimeout property is set to -5 seconds.
An request is made that does not get a response until after 10 seconds elapse.
Assume t is the time the original request is received.
The plug-in sends the request to server 1 and waits 5 seconds for a response. No response is received so server1 is marked down at the time the request was received plus 5 seconds (t + 5).
The request is now sent to server 2, it also fails to receive a response within 5 seconds so the plug-in marks server 2 down at the time the original request was received plus 10 seconds (t + 10).
The request is now sent to server 3 and it fails to get a response so it is marked down at the time the original request was received plus 15 seconds (t + 15).
Because all of the servers are now marked down, all requests will fail until server 1 is retried. Server 1 will be retried at the time the original request was received plus 5 seconds (ServerIOTimeout) plus 60 seconds which is the RetryInterval value (t + 5 +60). Server 2 will be marked as up 5 seconds (t + 10 + 60) later and server 3 will be marked as up 10 seconds (t + 15 + 60) after server 1 is marked as up. There will be 50 seconds where all the servers are marked as down and all requests would fail((t + 5+ 60) - (t + 15)) -- server 1 time marked up minus server 3's time marked down.
The following example illustrates the recommended configuration for the preceding scenario :
There are 3 servers in the cluster.
The RetryInterval property should be set within the range of 1 to 9.
( (number of servers -1 ) x (absolute value of ServerIOTimeout) ) - 1 = (( 3 - 1) * 5) - 1 = 10 - 1 = 9
The ServerIOTimeout property is set to -5 seconds. NOTE: This value is only being used as part of this example. It is not meant to imply that you should specify a timeout value of -5 seconds in all situations. For example this value is not appropriate for the ServerIOTimeout property if you know that some responses will take 10 seconds.
A request is made that does not get a response before ServerIOTimeout pops on server 1.
Assume t is the time the original request is received.
The plug-in sends the request to server 1 and waits 5 seconds for a response. No response is received so server 1 is marked down at the time the request was received plus 5 seconds (t + 5).
The request is now sent to server 2. If the RetryInterval property is set to the minimum recommended value of 1, server 1 will be marked up 1 second after server 2 has received the request (t + ServerIOTimeout + RetryInterval = t + 5 + 1 = t + 6). Server 2 does not get a response and is marked down at the time the original request was received plus 10 seconds (t + ServerIOTimeout to server 1 + ServerIOTimeout to server 2 = t + 10).
The request is sent to server 3. If the RetryInterval property is set to the maximum recommended value of 9, server 1 will be marked up (t+ ServerIOTimeout + retryInterval = t + 5 + 9 = t+14), 1 second before server 3 is marked down (t + ServerIOTimeout to server 1 + ServerIOTimeout to server2 + ServerIOTimeout to server 3 = t +5 + 5+ 5 = t +15) because it fails to receive a response within the ServerIOTimeout property value.
There will never be a time where all servers are marked down because of an unexpected long running request.
Source : http://www-01.ibm.com/support/docview.wss?uid=swg21450051&acss=dakc
The PostBufferSize property controls whether a request containing data, such as a POST request, will be retried to another server when failures and time-outs occur. By default, this property is set to 64K, which is the maximum content that can be buffered. If a request larger than this setting arrives, it will not be retried. Increasing the PostBufferSize property will consume more memory. As an alternative, you can disable the retry functionality of requests with content by setting the PostBufferSize property equal to 0, or you can set an unlimited buffer size by setting the PostBufferSize property to -1.
Requests that do not contain a body, such as GET requests, are automatically retried to another server whenever a failure or time-out occurs. This behavior cannot be disabled.
If a non-affinity request is retried, the plug-in will attempt to handle the request on each available server until a good response is received or each server has been tried. If an affinity request is retried and there is a positive ServerIOTimeout, affinity requests will be retried to the affinity appserver only. If there is a negative ServerIOTimeout, then the affinity server will be marked down and retries will be made to the remaining available servers.
The ServerIOTimeout property is designed to allow requests to time-out instead of waiting indefinitely for a response from the server. In Versions 6.1 and earlier, the ServerIOTimeout property defaults to 0, which indicates that there is no time limit for requests. This value is not recommended because if the a server never responds, the resources involved in this request might never be freed and eventually the resource pool is exhausted. In some cases, the operating system or adapter resources might break the connection because of inactivity but this is not behavior that should be relied on. You will need to determine the appropriate behavior for your environment if you plan to set the ServerIOTimeout property to 0.
If the ServerIOTimeout property is set to 0, do not expect requests to be retried. A request is not retried until the previous connection is broken and, as explained previously, the connection might not get broken. If you need to use the retry capabilities of the plug-in, either set the ServerIOTimeout property to a non-zero value, use the operating system settings, or use some other non-plug-in mechanism to ensure that you can guarantee that a connection is broken at some predetermined time.
With Version 7.0, the default value of the ServerIOTimeout property is 60 seconds. This might not be the ideal setting for applications running intensive queries or other nontrivial functions. The ServerIOTimeout value will need to be adjusted if you expect requests to take longer than 60 seconds to be served.
The ServerIOTimeout setting is based on how long the server takes to handle a request; not on a particular URI or application. Therefore, when specifying a value for this property, you should allow for the slowest, longest request time, and then add a little more time to handle peak operation situations.
When a request fails because the length of time it took to get a response exceeded the value specified for the ServerIOTimeout property, the server is NOT marked as down if the ServerIOTimeout property is set to a value >= 0. This is an important fact to keep in mind because this fact means that other requests will continue to be sent to this server. If you have affinity defined and this server is selected based on the request's previous session data, the same server will be selected if the request is retried because the server will still be available and matches the incoming affinity requirements. The actual number of times that the plug-in will attempt the request to the same server depends on the number of servers defined in the cluster. If the server is not healthy, sending requests back to the same server is not likely to result in a good response and might exasperate a potential performance problem.
Starting with Version 6.0.2.33, 6.1.0.23 and 7.0.0.3, if you do NOT want the same server selected for affinity requests that fail because of response time-outs or you would like to eliminate traffic from this server because it is not responding within your predefined response criteria, you should specify a negative value for the ServerIOTimeout property. When the value for the ServerIOTimeout property is negative, the plug-in marks the server down when a response time-out occurs. When the plug-in marks the server down, requests will not be sent to that server until the interval specified for the plug-in RetryInterval property expires. If there is only one server in the cluster, it is never marked down regardless of the plug-in properties.
Setting the ServerIOTimeout property to a negative value might have bad consequences if you set the time-out value too low. If you have a long running request that takes longer than the length of the time specified for the ServerIOTimeout property and that request is retried to other servers, the plug-in might mark every server in the cluster down as the request is retried to each server. Therefore, if you specify a negative value for the ServerIOTimeout property, you should ensure that the value specified for the RetryInterval property is within the range such that:
- The lowest value for the range is 1 but this means that the server will only be guaranteed a second to try to recover so the minimum value should be a value that is reasonable for the server to recover.
- The highest value for the range is 1 less than the result of multiplying the absolute value of the setting for the ServerIOTimeout property by one less than the number of servers in the cluster. ((absolute value of the ServerIOTimeout * (number of servers in cluster -1)) - 1
For example, if you set the ServerIOTimeout property to -5, and you have 3 servers in the cluster, the value specified for the RetryInterval property should be between 1 and 9. Specifying such a value guarantees that all of the servers are never marked down because of an unexpected intensive request. If your applications are designed such that a single request can have significant impact on the application server, such as an extensive query which might cause data locking until the query is complete, you should set the ServerIOTimeout property to a very large value, such as 18000 ( 5 hours). If you have selected to mark servers down whenever time-out failures occur, set the RetryInterval to the a value in the minimum recommended range to avoid removing the server from processing requests for a long period of time.
Examples :
The following example illustrates a non-recommended configuration and the potential problem that could arise :
There are 3 servers in the cluster.
The RetryInterval property is set to the default value of 60 seconds.
The ServerIOTimeout property is set to -5 seconds.
An request is made that does not get a response until after 10 seconds elapse.
Assume t is the time the original request is received.
The plug-in sends the request to server 1 and waits 5 seconds for a response. No response is received so server1 is marked down at the time the request was received plus 5 seconds (t + 5).
The request is now sent to server 2, it also fails to receive a response within 5 seconds so the plug-in marks server 2 down at the time the original request was received plus 10 seconds (t + 10).
The request is now sent to server 3 and it fails to get a response so it is marked down at the time the original request was received plus 15 seconds (t + 15).
Because all of the servers are now marked down, all requests will fail until server 1 is retried. Server 1 will be retried at the time the original request was received plus 5 seconds (ServerIOTimeout) plus 60 seconds which is the RetryInterval value (t + 5 +60). Server 2 will be marked as up 5 seconds (t + 10 + 60) later and server 3 will be marked as up 10 seconds (t + 15 + 60) after server 1 is marked as up. There will be 50 seconds where all the servers are marked as down and all requests would fail((t + 5+ 60) - (t + 15)) -- server 1 time marked up minus server 3's time marked down.
The following example illustrates the recommended configuration for the preceding scenario :
There are 3 servers in the cluster.
The RetryInterval property should be set within the range of 1 to 9.
( (number of servers -1 ) x (absolute value of ServerIOTimeout) ) - 1 = (( 3 - 1) * 5) - 1 = 10 - 1 = 9
The ServerIOTimeout property is set to -5 seconds. NOTE: This value is only being used as part of this example. It is not meant to imply that you should specify a timeout value of -5 seconds in all situations. For example this value is not appropriate for the ServerIOTimeout property if you know that some responses will take 10 seconds.
A request is made that does not get a response before ServerIOTimeout pops on server 1.
Assume t is the time the original request is received.
The plug-in sends the request to server 1 and waits 5 seconds for a response. No response is received so server 1 is marked down at the time the request was received plus 5 seconds (t + 5).
The request is now sent to server 2. If the RetryInterval property is set to the minimum recommended value of 1, server 1 will be marked up 1 second after server 2 has received the request (t + ServerIOTimeout + RetryInterval = t + 5 + 1 = t + 6). Server 2 does not get a response and is marked down at the time the original request was received plus 10 seconds (t + ServerIOTimeout to server 1 + ServerIOTimeout to server 2 = t + 10).
The request is sent to server 3. If the RetryInterval property is set to the maximum recommended value of 9, server 1 will be marked up (t+ ServerIOTimeout + retryInterval = t + 5 + 9 = t+14), 1 second before server 3 is marked down (t + ServerIOTimeout to server 1 + ServerIOTimeout to server2 + ServerIOTimeout to server 3 = t +5 + 5+ 5 = t +15) because it fails to receive a response within the ServerIOTimeout property value.
There will never be a time where all servers are marked down because of an unexpected long running request.
Source : http://www-01.ibm.com/support/docview.wss?uid=swg21450051&acss=dakc
WCM API - Deleting and purging Objects
<%@ page import="com.ibm.workplace.wcm.api.*"%>
<%@ page import="java.util.*"%>
<%
// retrieve repository
Repository repository = WCM_API.getRepository();
// get workspace for current user
Workspace workspace = repository.getWorkspace(request.getUserPrincipal());
// Set library
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("WebContent"));
// ********************** Delete \ Purge Content example **********************
// define content
String contentName = new String("Content");
String[] deleteMessage = new String[1];
// find content by name
DocumentIdIterator contentIterator =
workspace.findByName(DocumentTypes.Content,contentName);
DocumentId contentId = null;
if (contentIterator.hasNext()){
contentId = contentIterator.nextId();
// clear all the references of the content
if(workspace.getReferences(contentId)!=null)
workspace.clearReferences(workspace.getReferences(contentId));
// delete content
deleteMessage = workspace.delete(contentId);
out.println("Content deleted :" + deleteMessage);
// purge content
deleteMessage = workspace.purge(contentId);
out.println("
Content purged:" + deleteMessage);
} else {
out.println("Could not delete content :" + contentName);
}
// ****************** Delete \ Purge Library Component example ******************
// define library component
String libraryComponentName = new String("LibraryComponent");
// find library component by name
DocumentIdIterator libraryComponentIterator =
workspace.findByName(DocumentTypes.LibraryComponent,libraryComponentName);
DocumentId libraryComponentId = null;
if (libraryComponentIterator.hasNext()){
libraryComponentId = libraryComponentIterator.nextId();
// clear all the references of library component
if(workspace.getReferences(libraryComponentId)!=null)
workspace.clearReferences(workspace.getReferences(libraryComponentId));
// delete library component
deleteMessage = workspace.delete(libraryComponentId);
out.println("Library Component deleted :" + deleteMessage);
// purge library component
deleteMessage = workspace.purge(libraryComponentId);
out.println("
Library Component purged:" + deleteMessage);
} else {
out.println("Could not delete Library Component :" + libraryComponentName);
}
%>
When tapping into the IBM WCM API do not restrict yourself to a single JSP as this is purely a guideline....imagine this as part of a submission form, values passed to your jsp or servlet and then initiated.
You will soon possess the ability to build a simple yet effective user interface making interacting with WCM easy for any user.
<%@ page import="java.util.*"%>
<%
// retrieve repository
Repository repository = WCM_API.getRepository();
// get workspace for current user
Workspace workspace = repository.getWorkspace(request.getUserPrincipal());
// Set library
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("WebContent"));
// ********************** Delete \ Purge Content example **********************
// define content
String contentName = new String("Content");
String[] deleteMessage = new String[1];
// find content by name
DocumentIdIterator contentIterator =
workspace.findByName(DocumentTypes.Content,contentName);
DocumentId contentId = null;
if (contentIterator.hasNext()){
contentId = contentIterator.nextId();
// clear all the references of the content
if(workspace.getReferences(contentId)!=null)
workspace.clearReferences(workspace.getReferences(contentId));
// delete content
deleteMessage = workspace.delete(contentId);
out.println("Content deleted :" + deleteMessage);
// purge content
deleteMessage = workspace.purge(contentId);
out.println("
Content purged:" + deleteMessage);
} else {
out.println("Could not delete content :" + contentName);
}
// ****************** Delete \ Purge Library Component example ******************
// define library component
String libraryComponentName = new String("LibraryComponent");
// find library component by name
DocumentIdIterator libraryComponentIterator =
workspace.findByName(DocumentTypes.LibraryComponent,libraryComponentName);
DocumentId libraryComponentId = null;
if (libraryComponentIterator.hasNext()){
libraryComponentId = libraryComponentIterator.nextId();
// clear all the references of library component
if(workspace.getReferences(libraryComponentId)!=null)
workspace.clearReferences(workspace.getReferences(libraryComponentId));
// delete library component
deleteMessage = workspace.delete(libraryComponentId);
out.println("Library Component deleted :" + deleteMessage);
// purge library component
deleteMessage = workspace.purge(libraryComponentId);
out.println("
Library Component purged:" + deleteMessage);
} else {
out.println("Could not delete Library Component :" + libraryComponentName);
}
%>
When tapping into the IBM WCM API do not restrict yourself to a single JSP as this is purely a guideline....imagine this as part of a submission form, values passed to your jsp or servlet and then initiated.
You will soon possess the ability to build a simple yet effective user interface making interacting with WCM easy for any user.
PM00131: NULLPOINTEREXCEPTION IN WEBSPHERE APPLICATION SERVER GENERATED BY OBJECTMANAGER WHEN USING AN SIB FILE STORE.
I am Sharin this PMR as I hae received this question more then once.Hope this helps.
APAR status
Closed as program error.
Error description
In WebSphere Application Server, using a SIB messaging engine and file store (not a data store), SystemOut.log shows CWSIS0002E followed by "CWSOM1015E: ObjectManager", and there is a corresponding ffdc file which contains: Exception = java.lang.NullPointerException Source = com.ibm.ws.objectManager.ObjectManagerState:run probeid = 1:3061:1.23.1.11 Stack Dump = java.lang.NullPointerException at com.ibm.ws.objectManager.InternalTransaction. terminate(InternalTransaction.java:2329) at com.ibm.ws.objectManager.ObjectManagerState. deRegisterTransaction(ObjectManagerState.java:2045) at com.ibm.ws.objectManager.InternalTransaction. complete(InternalTransaction.java:2308) at com.ibm.ws.objectManager.InternalTransaction. backout(InternalTransaction.java:2158) at com.ibm.ws.objectManager. InternalTransaction$TransactionReference. complete(InternalTransaction.java:2762) at com.ibm.ws.objectManager.ObjectManagerState. completeOrphanTransactions(ObjectManagerState.java:2337) at com.ibm.ws.objectManager.ObjectManagerState. performCheckpoint(ObjectManagerState.java:776) at com.ibm.ws.objectManager.ObjectManagerState. access$500(ObjectManagerState.java:52) at com.ibm.ws.objectManager.ObjectManagerState$CheckpointHelper. run(ObjectManagerState.java:3052) at java.lang.Thread.run(Thread.java:810)
Local fix
Restart the server.
Problem summary
**************************************************************** * USERS AFFECTED: Users of the default messaging provider for * * IBM WebSphere Application Server * * Version 6.1 or Version 7.0 * **************************************************************** * PROBLEM DESCRIPTION: NullPointerException logged to an FFDC * * with probeid 1:3061:1.23.1.11 * * when using the file store * **************************************************************** * RECOMMENDATION: * **************************************************************** An FFDC report as follows might be generated from a messaging engine using a file store: Exception = java.lang.NullPointerException Source = com.ibm.ws.objectManager.ObjectManagerState:run probeid = 1:3061:1.23.1.11 As a result of this exception, the messaging engine reports itself as unhealthy to the application server's high availability manager, causing the JVM to be terminated and restarted on the next is-alive healthcheck. The problem occurs because code within the file store attempts to access a WeakReference without first checking if the reference is null.
Problem conclusion
The fix for this APAR corrects the file store code to check the weak reference is not null before accessing it. The fix for this APAR is currently targeted for inclusion in fix pack 6.1.0.31 and 7.0.0.9. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM00131Reported component name
SIBWSReported component ID
620600100Reported release
200Status
CLOSED PERPE
NoPEHIPER
NoHIPERSpecial Attention
NoSpecattSubmitted date
2009-10-30Closed date
2009-12-21Last modified date
2009-12-21
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
SIBWSFixed component ID
620600100
Applicable component levels
R200 PSY
UP
Thursday, February 14, 2013
How to retrieve a file name stored in WCM library file resource component using the API ReferenceComponent
finds the document id of the content items that match by name
DocumentIdIterator docIdIterator = ws.findByName(DocumentTypes.Content, "testcontent");
DocumentId docId;
Content currentContent;
loops through the document id's found in the iterator
while(docIdIterator.hasNext())
{
docId = (DocumentId)docIdIterator.next();
get the current content item
currentContent = (Content)ws.getById(docId);
standard out log message
System.out.println("Log: Testing WCM API: Retrieved content name = "
+ (String)currentContent.getName());
get the content's component reference element by name
ContentComponent myCmpnt =
(ContentComponent) currentContent.getComponent("MyComponent");
standard out log message
System.out.println("Log: Testing WCM API: My Component getName = "
+ (String)myCmpnt.getName());
Typecast using ReferenceComponent in order to access the library component
stored in the content's component reference element
ReferenceComponent myRefCmpnt;
myRefCmpnt = (ReferenceComponent)myCmpnt;
Get the LibraryComponent which your content is referencing
LibraryComponent myLibCmpnt = myRefCmpnt.getComponentRef() ;
standard out log message
System.out.println("Log: Testing WCM API: My Library Component name = "
+ myLibCmpnt.getName());
Use the instanceof method to confirm the library component type.
For example, this checks if your component is a Library File Component.
if (myLibCmpnt instanceof LibraryFileComponent)
{
In this example, the component reference holds a LibraryFileComponent.
This will get the file name of the file stored in the LibraryFileComponent.
LibraryFileComponent fileCmpnt;
fileCmpnt= (LibraryFileComponent)myLibCmpnt;
standard out log message
System.out.println("Log: Testing WCM API: My Library File Component: File name = "
+ fileCmpnt.getFileName() );
} end if statement
Subscribe to:
Posts (Atom)
Generate reports from Opportunities using a Visualforce Page in Salesforce
Step 1: Create a Visualforce Page Go to the Setup menu in Salesforce. Search for "Visualforce Pages" in the Quick Find box and c...
-
So I ran into this nasty little bugger and my approval process came to a grinding halt. For those who have never seen this before your fi...
-
Inline Editing So now I have tested the inline editing jsp done by David De Vos.Simply brilliant! Really offers you the ability to offe...