WebSphere brand IBM WebSphere Presence Server, Version 7.0

Configuring expiration times for PUBLISH and SUBSCRIBE requests

You can assign default values for the expiration times of PUBLISH and SUBSCRIBE requests by modifying their values in the configuration file.

Before you begin
You will need the following files to complete this task. After you install the Presence Server product, these files are found in the directory was_root/installableApps/presence/scripts/config.
  • SystemConfiguration.xml
  • ConfigurationParams.txt
  • UpdateConfiguration.jar
Before you can make changes to your configuration, the file UpdateConfiguration.jar must be in the class path.
About this task

The expiration time for any PUBLISH or SUBSCRIBE request is determined by the request's Expires header. You can configure Presence Server to assign a default expiration time when a request does not have an Expires header. You can also define a maximum expiration time, used when the value in the Expires header exceeds a certain threshold, and a minimum time, below which requests are rejected.

Expiration times are measured in minutes. To change the settings of expiration times for PUBLISH and SUBSCRIBE requests, complete the following steps:

  1. Open SystemConfiguration.xml with a text editor.
  2. Modify the attributes for the publishExpiration and subscribeExpiration tags. These tags, respectively, set the expiration times for PUBLISH requests and SUBSCRIBE requests.
    You can set the following attributes for both tags. Default values are shown.
    default="60"
    The expiration time in minutes, when a PUBLISH or SUBSCRIBE request arrives with no Expires header.
    maximum="1440"
    An upper limit on the expiration time in minutes, for PUBLISH and SUBSCRIBE requests. When a request arrives with a higher value specified in its Expires header, its expiration time is reset to this value. 1440 minutes, or 24 hours, is the highest value allowed.
    minimum="1"
    A lower limit on the expiration time, in minutes, for PUBLISH and SUBSCRIBE requests. When a request arrives with a lower value specified in its Expires header, the request is rejected. 1 minute is the lowest value allowed.
    For example:
    • <publishExpiration default="60" maximum="1440" minimum="1"/>
    • <subscribeExpiration default="60" maximum="1440" minimum="1"/>
  3. Save and close the file.
  4. Open ConfigurationParams.txt with a text editor.
  5. Update the following parameters for your environment:
    • cfg.system = xml_path (where xml_path is the directory location for SystemConfiguration.xml)
    • username = database_administrator_user_name
    • password = database_administrator_password
    • DB2 dbDriver = com.ibm.db2.jcc.DB2Driver
    • Oracle dbDriver = oracle.jdbc.driver.OracleDriver
    • DB2 dbConnectionString = jdbc:db2://database_host_name:database_port/database_name
    • Oracle dbConnectionString = jdbc:oracle:thin:@database_host_name:database_port:database_name
  6. Run the java command that is appropriate for your operating system:
    Important: Enter the following parameters on a single line.
    • AIXLinux java -classpath UpdateConfiguration.jar: jdbc_path CmdConfig config_path/ConfigurationParams.txt
    (where jdbc_path is the directory location for your JDBC drivers and config_path is the directory location for ConfigurationParams.txt)
    Important: JDBC drivers must be separated by a colon.
    For example:
    • AIX /usr/IBM/WebSphere/AppServer/java/bin/java -classpath UpdateConfiguration.jar:/opt/IBM/db2/V9.5/java/db2jcc.jar:/opt/IBM/db2/V9.5/java/db2jcc_license_cu.jar CmdConfig ConfigurationParams.txt
    • Linux /opt/IBM/WebSphere/AppServer/java/bin/java -classpath UpdateConfiguration.jar:/opt/IBM/db2/V9.5/java/db2jcc.jar:/opt/IBM/db2/V9.5/java/db2jcc_license_cu.jar CmdConfig ConfigurationParams.txt
  7. Restart the application:
    1. Click Applications > Application types > WebSphere Enterprise Applications.
      Note: If you are using WebSphere® Application Server version 6.1.0.x, reach this window by clicking Applications > Enterprise Applications.
    2. Select the check box associated with the Presence Server.
    3. Click Stop. The Application Status column should indicate a Stopped status.
    4. Click Start. The Application Status column should indicate a Started status.



Terms of use
(C) Copyright IBM Corporation 2009. All Rights Reserved.