Setting available MBean attributes

Many CM Server attributes can be modified by setting MBean attributes. This topic describes MBean attributes and how to set them.

The attributes are categorized by the MBean in which they reside. All parameters can be retrieved and are denoted with [R] for read. The parameters that can be changed are denoted with a [W] for write. The attributes can be accessed with JACL commands by using the WebSphere® wsadmin command line utility. The teamAdminUtils.jacl file provides examples of JACL commands, syntax, and functions.

Changes can be made to the settable parameters only while the CM Server is running; a server restart is never required since changes are visible in real time. Changes made to MBean attributes that govern the launching of backend ONCRPC server processes do not affect backend ONCRPC processes that have already been started; only newly launched backend ONCRPC server processes observe the new settings.

There are three MBeans that are created at CM Server startup: the TeamServerMBean that holds CM Server-wide configuration attributes, the CcServerFactoryMBean that holds ClearCase Managed Connection Factory attributes, and the CqServerFactoryMBean that holds ClearQuest Managed Connection Factory attributes. Each of these MBeans represents a distinct configurable entity within the CM Server.

The managed connection factories are the CM Server components responsible for launching the backend ONCRPC server processes. These backend processes bridge the connection to the ClearCase and ClearQuest-specific core products.

The ClearCase managed connection factory launches single-threaded ClearCase ONCRPC backend server processes, each referred to as a single ccrpc process. One process is launched for a specific set of credentials, and services that set of credentials until it is no longer needed. Since the ccrpc process is single-threaded, each ccrpc process tends to stay active for short periods of time. The ClearCase managed connection factory automatically performs lifecycle management on each ccrpc process.

The ClearQuest managed connection factory launches one (or possible more) multithreaded ClearQuest ONCRPC backend server processes, each referred to as a single cqrpc process. Since the cqrpc process is multithreaded it can process requests from many different credentials, thus the cqrpc processes tend to consume more resources and stay active for longer periods of time than the ccrpc backend processes. The ClearQuest managed connection factory automatically performs lifecycle management on each cqrpc process.

For more information on CM Server managed connection factory lifecycle management, see CM Server managed connection factory lifecycle management.

CM Server includes the following MBeans.

wsadmin example

The following example illustrates JACL-based commands to start and use the wsadmin utility.
  • // Enter commands like the following to start up the wsadmin utility.  Your wsadmin utility is 
    // located in a directory such as "C:\Program Files\IBM\RationalSDLC\common\CM\scripts" on Windows
    // or "/opt/IBM/RationalSDLC/common/CM/scripts" on UNIX, or "/opt/ibm/RationalSDLC/common/CM/scripts" on Linux.
    
    # cd <to the directory containing JACL scripts>
    // For Windows:
    # set WAS_BIN="C:\Program Files\IBM\RationalSDLC\common\CM\profiles\cmprofile\bin"  
    // For UNIX: 
    # set WAS_BIN=/opt/IBM/RationalSDLC/common/CM/profiles/cmprofile/bin
    // For Linux: 
    # set WAS_BIN=/opt/ibm/RationalSDLC/common/CM/profiles/cmprofile/bin
    
    
    // For Windows:
    # %WAS_BIN%\wsadmin
    // For UNIX:
    # $WAS_BIN/wsadmin.sh
    
    
    // This wsadmin command loads several useful functions that are available for you to use:
    wsadmin> source teamAdminUtils.jacl
    
    // This command shows an example of how to display some useful commands. The getTeamServer 
    // function is  useful for establishing a pointer to the top level TeamServerMBean, and will help 
    // get and set individual TeamServerMBean attributes.
    
    wsadmin> info proc *Team*
        startTeamEAR stopTeamEAR getTeamServer
    
    // This command displays the available 'dump' commands for quick and easy viewing of the MBean 
    // values:
    wsadmin> info proc dump*
    
       dumpAllServers dumpAll dumpTeamServer dumpCcServers dumpCqServerFactory 
       dumpCcServerFactory dumpCqServers
    
    
    // This command 'uses' the convenience command 'getTeamServer' to set up the 
    // variable 't' that can then be used to access TeamServerMBean attributes:
    wsadmin> set t [getTeamServer]
    
    // Retrieve the TeamServerMBean attribute values using the variable 't':
    wsadmin> $AdminControl getAttributes $t
    
    {cqServerFactory WebSphere:cell=testhost2Node01Cell,version=6.1.0.0,spec=1.0,name=CqServerFactoryMBeanId,
        mbeanIdentifier=CqServerFactoryMBeanId,type=stp.management.CqServerFactoryMBean,node=testhost2Node01,
        process=server1}
    
    {ccrcUseViewHostPathForGlobalPath false}
    {oncrpcBufferLimit 100}
    {cqLoginSessionWaitTimeout 120}
    {oncrpcInterruptLimit 1000}
    {ccrcUnixCqHome {
    {sessionReaperThreadDelay 900}
    {ccrcUserRegionMapfile {
    {ccrcTempDir {
    {ccrcTraceSubsystem {
    {sessionQueryObjectTimeout 1800}
    {oncrpcServers {
    {cqLoginSessionTimeout 1800}
    {cqFulltextSearchRecordHitLimit 200}
    {ejbBufferLimit 100}
    {ccrcVobLineTerminator {
    {sessionRecordObjectTimeout 10800}
    {cqFulltextSearchPageSize 25}
    {numberOfActiveSessions 0}
    {ccServerFactory WebSphere:cell=testhost2Node01Cell,version=6.1.0.0,spec=1.0,name=CcServerFactoryMBeanId,
        mbeanIdentifier=CcServerFactoryMBeanId,type=stp.management.CcServerFactoryMBean,node=testhost2Node01,
        process=server1}
    {sessionObjectDefaultTimeout 1800}
    {ccrcUploadLimit 0}
    {maxProcureServerAttempts 6}
    {cqFulltextSearchCacheSize 1000}
    {ccrcTraceLevel 0}
    {maxCqSessionsPerUser 2}
    {ccrcLoginSessionTimeout 900}
    {totalNumberOfOncrpcServers 0}
    {ccrcViewStorage {
    {numberOfHttpSessionsCreated 0}
    {ccrcPrimaryGroup {
    {procureServerInterval 60}
    
    
    
    // Another (more convenient) way to retrieve all of the TeamServerMBean attributes is:
    wsadmin> dumpTeamServer
    
    TeamServerMBean Attributes:
    ====================
    
    {cqServerFactory WebSphere:cell=testhost2Node01Cell,version=6.1.0.0,spec=1.0,name=CqServerFactoryMBeanId,
        mbeanIdentifier=CqServerFactoryMBeanId,type=stp.management.CqServerFactoryMBean,node=testhost2Node01,
        process=server1}
    
    {ccrcUseViewHostPathForGlobalPath false}
    . . .
    
    
    // This command sets up the variable 'cc' for accessing the ccServerFactory MBean 
    // attributes. Note that the variable 't' defined in a previous command is used to 
    // obtain a pointer to the TeamServerMBean's ccServerFactory attribute value; the
    // variable 'cc' can then be used to access the attributes in the CcServerFactoryMBean:
    wsadmin> set cc [$AdminControl getAttribute $t ccServerFactory]
    
    // Another (more convenient) way to set up the variable 'cc' is:
    wsadmin>set cc [getCcServerFactory]
    
    
    // Other 'get' convenience commands include: getCcServerFactory, getCqServerFactory, 
    // getTeamServer and getOncrpcServers.
    
    
    // This command retrieves the CcServerFactoryMBean attribute values using the 'cc' variable 
    // defined above:
    wsadmin> $AdminControl getAttributes $cc
        {oncrpcCallThreshold 5000}
        {idleServerInterval 600}
        {serverThresholdCount 50}
        {maxServersPerCredential 5}
        {maxServerCount 200}
        {interactionRequestTimeout 300}
        {busyServerPossiblyIdleLimit 14400}
    
    // This command sets the maxServerCount MBean attribute that is defined in the 
    // CcServerFactoryMBean, referenced using the 'cc' variable defined in a previous command:
    wsadmin> $AdminControl setAttribute $cc maxServerCount 101
    
    
    // This command sets up the variable 'cq' for accessing the CqServerFactoryMBean attributes. 
    // Note that the variable 't' defined in a previous command is used to obtain a pointer to the 
    // TeamServerMBean's cqServerFactory attribute value; the variable 'cq' can then be used 
    // to access the attributes in the CqServerFactoryMBean:
    wsadmin> set cq [$AdminControl getAttribute $t cqServerFactory]
    
    // Another (more convenient) way to set up the variable 'cq' is:
    wsadmin>set cq [getCqServerFactory]
    
    // This command retrieves the CqServerFactoryMBean attribute values using the 'cq' variable
    // defined above:
    wsadmin> $AdminControl getAttributes $cq
    . . . 
    
    // This command sets up the variable 'os' to use for accessing the list of ONCRPC server MBeans,
    // each of which represents a specific ONCRPC backend server.  The command uses one of the 
    // convenience methods defined in the teamAdminUtils.jacl script that was 'sourced' at the 
    // beginning of this session:
    wsadmin> set os [$AdminControl invoke $t getOncrpcServers]
            .   .   .   
    
            // A list of the running oncrpc backend servers is displayed. The first oncrpc server
            // is at index 0 (zero), the second is at index 1, and so on...
    
    
    // This command sets up the variable 'o' to use for accessing the first oncrpc server MBean 
    // displayed in the output from the above command. This level of MBean attribute access (i.e.,
    // specific oncrpc server MBeans) is tricky since the backend oncrpc server processes are 
    // transient and my be dismissed before you can access them.
    wsadmin> set o [getOnc 0]   // '0' is the index number of the first backend servers listed
                                           // in the output of the above command
    
    // This command retrieves the MBean attribute values for the CQ oncrpc server defined by the
    // variable 'o':
    wsadmin> $AdminControl getAttributes $o
            {workerThreadCount 16}
            {serverState 1}
            {activeStatefulHttpSessions 0}
            {port 3431}
            {oncrpcCalls 7}
            {recycleServerHttpSessionLimit 500}
            {serverId {ClearQuest - 0
            {serverType ClearQuest}
            {hostname testhost2}
            {activeHttpSessions 0}
            {totalHttpSessions 1}
    
    
    
    // These commands set and then get the recycleServerHttpSessionLimit attribute in the CQ 
    // oncrpc server defined by the variable 'o' above:
    wsadmin> $AdminControl setAttribute $o recycleServerHttpSessionLimit 501
    
    wsadmin> $AdminControl getAttribute $o recycleServerHttpSessionLimit
         501
    
    
    // These next commands set up and use the variable 'o' for accessing the second oncrpc server
    // MBean displayed in the output from the list of oncrpc servers obtained earlier.  In this example,
    // the desired CC ONCRPC server has already been dismissed by the CM Server lifecycle 
    
    // Management tasks:
    wsadmin> set o [getOnc 1]   
    
    wsadmin> $AdminControl getAttributes $o
        WASX7015E: Exception running command: "$AdminControl getAttributes $o"; exception information:
           com.ibm.ws.scripting.ScriptingException: WASX7025E: Error found in String ""; cannot
           create ObjectName.
    
    // In the above command, the running CC oncrpc server process had already been cleaned up by the 
    // CM Server's lifecycle management task, thus the "WASX7015E:" error was displayed.  You will also
    // see this error if the index value you specify to the getOnc method is invalid (out of range).
    
    // The remaining commands show a few more oncrpc server MBean accesses and their output.
    // Remember that the list of ONCRPC servers is transient; using the dump commands such
    // as dumpCcServers, dumpCqServers, or dumpAllServers is much more convenient:
    
    wsadmin> set o [getOnc 1]
        WebSphere:cell=testhost2Node02Cell,version=6.1.0.0,spec=1.0,name=ClearCase - 15,
        mbeanIdentifier=ClearCase - 15,type=stp.management.CcOncrpcServerMBean,
        node=testhost2Node02,process=server1
    
    wsadmin> $AdminControl getAttributes $o
            {serverType ClearCase}
            {serverState 1}
            {hostname testhost2}
            {port 4808}
    
    wsadmin> listOnc
           "WebSphere:cell=testhost2Node02Cell,version=6.1.0.0,spec=1.0,
           name=ClearQuest - 11,mbeanIdentifier=ClearQuest - 11,
           type=stp.management.CqOncrpcServerMBean,node=testhost2Node02,
           process=server1"
           "WebSphere:cell=testhost2Node02Cell,version=6.1.0.0,spec=1.0,
           name=ClearCase - 14,mbeanIdentifier=ClearCase - 14,
           type=stp.management.CcOncrpcServerMBean,node=testhost2Node02,
           process=server1
    
    wsadmin> set o [getOnc 1]  // 0 = "ClearQuest - 11", 1 = "ClearCase - 15"
            WebSphere:cell=testhost2Node02Cell,version=6.1.0.0,spec=1.0,name=ClearCase - 15,
            mbeanIdentifier=ClearCase - 15, type=stp.management.CcOncrpcServerMBean,
            node=testhost2Node02,process=server1
    
    wsadmin> $AdminControl getAttributes $o
           {serverType ClearCase}
           {serverState 1}
           {hostname testhost2}
           {port 4808}
           {serverId ClearCase - 15}
           {oncrpcCalls 2}
    
    // Here are examples of what you'll see when using the convenience dump commands:
    wsadmin> dumpAllServers
    
    ONCRPC Server: ClearCase - 0
    ============
    {serverType ClearCase}
    {serverState 1}
    {hostname testhost2}
    {port 3672}
    {serverId {ClearCase - 0
    {oncrpcCalls 7}
    
    ONCRPC Server: ClearQuest - 0
    ============
    {workerThreadCount 10}
    {serverState 1}
    {activeStatefulHttpSessions 0}
    {port 3693}
    {oncrpcCalls 1}
    {recycleServerHttpSessionLimit 500}
    {serverStartTime 1215633895763}
    {serverId {ClearQuest - 0
    {recycleReasonCode 0}
    {serverType ClearQuest}
    {hostname testhost2}
    {activeHttpSessions 0}
    {totalHttpSessions 0}
    
    
    wsadmin> dumpCcServers
    CCRPC Server: ClearCase - 0
    ===========
    {serverType ClearCase}
    {serverState 1}
    {hostname duke2}
    {port 3672}
    {serverId {ClearCase - 0
    {oncrpcCalls 7}
    
    
    
    wsadmin> dumpCqServers
    CQRPC Server: ClearQuest - 0
    ===========
    {workerThreadCount 10}
    {serverState 1}
    {activeStatefulHttpSessions 0}
    {port 3693}
    {oncrpcCalls 1}
    {recycleServerHttpSessionLimit 500}
    {serverStartTime 1215633895763}
    {serverId {ClearQuest - 0
    {recycleReasonCode 0}
    {serverType ClearQuest}
    {hostname duke2}
    {activeHttpSessions 0}
    {totalHttpSessions 0}
    
    
    wsadmin> dumpCqServerFactory
    CqServerFactoryMBean Attributes:
    ==========================
    {serverWorkerThreadCount 10}
    {recycleServerLifetimeLimit 14400}
    {recyclingPeriod 3600}
    {recycleServerOncrpcCallLimit 500000}
    {recycleServerHttpSessionLimit 500}
    {maximumActiveServers 4}
    {activeHttpSessionThreshold 40}
    
    
    wsadmin> dumpCcServerFactory
    CcServerFactoryMBean Attributes:
    ==========================
    {oncrpcCallThreshold 5000}
    {idleServerInterval 600}
    {serverThresholdCount 50}
    {maxServersPerCredential 5}
    {maxServerCount 101}
    {interactionRequestTimeout 300}
    {busyServerPossiblyIdleLimit 14400}
    
    
    wsadmin> dumpAll
         // The output of this command is a dump of all of the MBean attribute values, including
         // all of the currently running backend ONCRPC server processes.
    
  • Additional convenience commands for importing and exporting MBean attributes

    In addition to retrieving and setting individual MBean attributes using the wsadmin commands, two convenience methods exist that enable you to import and export MBean attribute values from/to properties files. Properties files can be edited using a text editor and can be imported and exported in real time; no CM Server restarts are required. CM Server must be running when using wsadmin.

    You can comment out any entries in the properties file that you do not need or want to import. Be sure to follow the naming conventions for the MBean names and attribute names (see example exported properties file below).

    To unset a String value using the importFile command, specify "" or leave the value blank in the properties file being imported. Numeric values must not be left blank.

    // This wsadmin command loads all of the convenience commands and methods, including the importFile 
    // and exportToFile commands.  These commands enable easy retrieval and updating of MBean attribute values
    // as well as a simple way to capture specific configurations.  If the CM Server is experiencing difficulties, a
    // previously captured configuration can quickly be imported in real time. 
    wsadmin> source teamAdminUtils.jacl
    
    // Use the exportToFile convenience command if you want to capture a snapshot of the 
    // TeamServerMBean, CcServerFactoryMBean and the CqServerFactoryMBean MBeans.  Just specify 
    // the full pathname of where to store the file. The resulting properties file can then be edited using
    // a text editor, then imported using the importFile command.
    // NOTE: You must use forward-slashes in the pathname for each of these commands.
    wsadmin> exportToFile C:/temp/CmServer.properties
    
    File "C:/temp/CmServer.properties" does not exist, proceeding with export...
    Retrieving MBeans...
    Exporting TeamServerMBean.sessionReaperThreadDelay...
    Exporting TeamServerMBean.cqLoginSessionTimeout...
    Exporting TeamServerMBean.cqLoginSessionWaitTimeout...
    Exporting TeamServerMBean.sessionObjectDefaultTimeout...
    Exporting TeamServerMBean.sessionQueryObjectTimeout...
    Exporting TeamServerMBean.sessionRecordObjectTimeout...
    Exporting TeamServerMBean.oncrpcBufferLimit...
    Exporting TeamServerMBean.oncrpcInterruptLimit...
    Exporting TeamServerMBean.ejbBufferLimit...
    Exporting TeamServerMBean.ccrcLoginSessionTimeout...
    Exporting TeamServerMBean.ccrcViewStorage...
    Exporting TeamServerMBean.ccrcUploadLimit...
    Exporting TeamServerMBean.ccrcTempDir...
    Exporting TeamServerMBean.ccrcPrimaryGroup...
    Exporting TeamServerMBean.ccrcUnixCqHome...
    Exporting TeamServerMBean.ccrcVobLineTerminator...
    Exporting TeamServerMBean.ccrcUserRegionMapfile...
    Exporting TeamServerMBean.ccrcTraceLevel...
    Exporting TeamServerMBean.cqFulltextSearchPageSize...
    Exporting TeamServerMBean.cqFulltextSearchCacheSize...
    Exporting TeamServerMBean.cqFulltextSearchRecordHitLimit...
    Exporting TeamServerMBean.procureServerInterval...
    Exporting TeamServerMBean.maxProcureServerAttempts...
    Exporting TeamServerMBean.maxCqSessionsPerUser...
    Exporting CcServerFactoryMBean.maxServerCount...
    Exporting CcServerFactoryMBean.serverThresholdCount...
    Exporting CcServerFactoryMBean.idleServerInterval...
    Exporting CcServerFactoryMBean.maxServersPerCredential...
    Exporting CcServerFactoryMBean.interactionRequestTimeout...
    Exporting CcServerFactoryMBean.busyServerPossiblyIdleLimit...
    Exporting CcServerFactoryMBean.oncrpcCallThreshold...
    Exporting CqServerFactoryMBean.serverWorkerThreadCount...
    Exporting CqServerFactoryMBean.activeHttpSessionThreshold...
    Exporting CqServerFactoryMBean.maximumActiveServers...
    Exporting CqServerFactoryMBean.recycleServerHttpSessionLimit...
    Exporting CqServerFactoryMBean.recycleServerLifetimeLimit...
    Exporting CqServerFactoryMBean.recycleServerOncrpcCallLimit...
    Exporting CqServerFactoryMBean.recyclingPeriod...
    
    wsadmin> importFile C:/temp/CmServer.properties
    
    File "C:/temp/CmServer.properties" found, proceeding with import...
    Importing value '900' into property sessionReaperThreadDelay in MBean TeamServerMBean
        Old value=900
        New value=900
    Importing value '1803' into property cqLoginSessionTimeout in MBean TeamServerMBean
        Old value=1803
        New value=1803
    Importing value '120' into property cqLoginSessionWaitTimeout in MBean TeamServerMBean
        Old value=120
        New value=120
    Importing value '1800' into property sessionObjectDefaultTimeout in MBean TeamServerMBean
        Old value=1800
        New value=1800
       . . .
    
    // If you attempt to export to a file that already exists, a time-stamp is automatically 
    // appended to the filename you specified in the command:
    wsadmin> exportToFile C:/temp/CmServer.properties
    
    File "C:/temp/CmServer.properties" already exists; appending date to file name.
    exportFilePath is now: C:/temp/CmServer.properties_2008-07-09_16-27-11
    Retrieving MBeans...
    Exporting TeamServerMBean.sessionReaperThreadDelay...
    
    // Here is what a typical exported file looks like:
    C:\> type c:\temp\CmServer.properties
    # Export of CM Server MBean attributes, created: 2008-07-09_16-22-29
    #
    #
    # TeamServerMBean writable attributes
    #
    TeamServerMBean.sessionReaperThreadDelay=900
    TeamServerMBean.cqLoginSessionTimeout=1803
    TeamServerMBean.cqLoginSessionWaitTimeout=120
    TeamServerMBean.sessionObjectDefaultTimeout=1800
    TeamServerMBean.sessionQueryObjectTimeout=1803
    TeamServerMBean.sessionRecordObjectTimeout=10800
    TeamServerMBean.oncrpcBufferLimit=100
    TeamServerMBean.oncrpcInterruptLimit=1000
    TeamServerMBean.ejbBufferLimit=100
    TeamServerMBean.ccrcLoginSessionTimeout=900
    TeamServerMBean.ccrcViewStorage=
    TeamServerMBean.ccrcUploadLimit=0
    TeamServerMBean.ccrcTempDir=
    TeamServerMBean.ccrcPrimaryGroup=
    TeamServerMBean.ccrcUnixCqHome=
    TeamServerMBean.ccrcVobLineTerminator=
    TeamServerMBean.ccrcUserRegionMapfile=
    TeamServerMBean.ccrcTraceLevel=0
    TeamServerMBean.cqFulltextSearchPageSize=25
    TeamServerMBean.cqFulltextSearchCacheSize=1000
    TeamServerMBean.cqFulltextSearchRecordHitLimit=200
    TeamServerMBean.procureServerInterval=60
    TeamServerMBean.maxProcureServerAttempts=6
    TeamServerMBean.maxCqSessionsPerUser=2
    #
    # CcServerFactoryMBean writable attributes
    #
    CcServerFactoryMBean.maxServerCount=101
    CcServerFactoryMBean.serverThresholdCount=50
    CcServerFactoryMBean.idleServerInterval=600
    CcServerFactoryMBean.maxServersPerCredential=5
    CcServerFactoryMBean.interactionRequestTimeout=300
    CcServerFactoryMBean.busyServerPossiblyIdleLimit=14400
    CcServerFactoryMBean.oncrpcCallThreshold=5000
    #
    # CqServerFactoryMBean writable attributes
    #
    CqServerFactoryMBean.serverWorkerThreadCount=10
    CqServerFactoryMBean.activeHttpSessionThreshold=40
    CqServerFactoryMBean.maximumActiveServers=4
    CqServerFactoryMBean.recycleServerHttpSessionLimit=500
    CqServerFactoryMBean.recycleServerLifetimeLimit=14400
    CqServerFactoryMBean.recycleServerOncrpcCallLimit=500000
    CqServerFactoryMBean.recyclingPeriod=3600
Related concepts
Modifying the CM Server MBean attributes for ClearQuest Web

Feedback