+

Search Tips   |   Advanced Search

Extracting properties files

We can use wsadmin.sh to extract properties files for cell, server, server subtype, and node configurations. Using the PropertiesBasedConfiguration (AdminTask), we can extract the configuration attributes and values from the environment to properties files.

(dist)(zos) Avoid trouble: We cannot apply a z/OS operating system properties file directly to a distributed operating system. Similarly, we cannot apply a distributed operating system properties file directly to a z/OS operating system. gotcha

Complete the following steps to run the extractConfigProperties command and extract a properties file for a cell, server, server subtype, or node configuration. Optionally, we can use interactive mode with the command:


Extract a cell configuration

  1. Start wsadmin

  2. Extract the object configuration

      AdminTask.extractConfigProperties('[-propertiesFileName ConfigProperties_cell.props]')

    The system extracts the properties file, as the following example displays:

    Cell.props  
    # 
    # SubSection 1.0 
    # Cell level attributes 
    # 
    ResourceType=Cell   
    ImplementingResourceType=Cell 
    ResourceId=Cell=!{cellName} 
    #  
    # 
    #Properties 
    # shortName=null  cellType=DISTRIBUTED 
    #ENUM(UDP|TCP|MULTICAST|DISTRIBUTED|STANDALONE),readonly name=!{cellName}
     multicastDiscoveryAddressEndpointName=null  discoveryAddressEndpointName=null cellDiscoveryProtocol=TCP
     
    #ENUM(UDP|TCP|MULTICAST)  
    Properties of nodes,servers, clusters, applications, etc. 
        EnvironmentVariablesSection 
    # 
    # 
    #Environment Variables 
    #Day Month 17 Time CDT Year  cellName=myCell 

    The properties file does not display the cell, node, server, cluster, application, core group, or node group names. Instead, the command creates variables, such as !{cellName}, and includes them in the EnvironmentVariables section at the end of the properties file. The Environment Variables section contains each variable in the properties file.


Extract a server configuration

  1. Start the wsadmin scripting tool.

  2. Extract the application server configuration of interest.

    Use the extractConfigProperties command to extract the server configuration, as the following Jython example demonstrates:

      AdminTask.extractConfigProperties('[-propertiesFileName ConfigProperties_server1.props -configData Server=server1]')

    The system extracts the properties file, as the following example displays:

    # 
    # SubSection 1.0 
    # Server Section 
    # ResourceType=Server ImplementingResourceType=Server   
    ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName} 
    #  
    # 
    #Properties  
    # shortName=null serverType=DEPLOYMENT_MANAGER
    #readonly developmentMode=false
    #boolean parallelStartEnabled=true 
    #boolean name=!{serverName} clusterName=null uniqueId=null 
      modelId=null 
       Properties of other inner objects ( EJBContainer, WebContainer, ORB etc)
     and subtypes not shown. 
       EnvironmentVariablesSection 
    # 
    #Environment Variables  
    #Day Month 16 Time CDT Year cellName=myCell nodeName=myNode  
    hostName=myHost.com serverName=dmgr 

    The properties file does not display the cell, node, server, cluster, application, core group, or node group names. Instead, the command creates variables, such as !{cellName}, and includes them in the EnvironmentVariables section at the end of the properties file. The Environment Variables section contains each variable in the properties file.

  • Extract the a server subtype configuration for a specific server.

    1. Start the wsadmin scripting tool.

    2. Extract the EJB container and web container properties for a specific server.

      Use the extractConfigProperties command to extract the server configuration, as the following Jython examples demonstrates:

        AdminTask.extractConfigProperties('[-propertiesFileName ejbcontainer.props -configData Server=server1 -filterMechanism SELECTED_SUBTYPES -selectedSubTypes [EJBContainer WebContainer]]')

      The system extracts the properties file, as the following example displays:

      # 
      # SubSection 1.0 
      # EJBContainer 
      # ResourceType=EJBContainer   
      ImplementingResourceType=EJBContainer   
      ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=ID
      #ApplicationServer_1:EJBContainer=ID
      #EJBConntainer_1 AttributeInfo=components  
      #  
      # 
      #Properties 
      # EJBTimer={} 
      #ObjectName*(null) name=null defaultDatasourceJNDIName=null
        inactivePoolCleanupInterval=30000 
      #long passivationDirectory="${USER_INSTALL_ROOT}/temp"
       enableSFSBFailover=false 
      #boolean  server=null parentComponent=
      WebSphere Application Server Network Deployment Server  
      # 
      # SubSection 1.0  
      # WebContainer  
      # 
      ResourceType=WebContainer  
      ImplementingResourceType=WebContainer   
      ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=
      ID
      #ApplicationServer_1:WebContainer=ID
      #WebConntainer_1 AttributeInfo=components 
      #  
      # 
      #Properties  
      # enableServletCaching=false 
      #boolean 
      name=null defaultVirtualHostName=null  
      server=null  
      maximumPercentageExpiredEntries=15 
      #integer asyncIncludeTimeout=60000 
      #integer parentComponent=WebSphere Application Server Network Deployment   
      Server disablePooling=false 
      #boolean sessionAffinityFailoverServer=null  
      maximumResponseStoreSize=100 
      #integer  
      allowAsyncRequestDispatching=false 
      #boolean  
      sessionAffinityTimeout=0 
      #integer   
      EnvironmentVariablesSection 
      # 
      #Environment   
      Variables 
      #Thu Apr 17 14:17:25 CDT 2008 cellName=myCell nodeName=myNode  
      hostName=myhost.com serverName=dmgr 

      The properties file does not display the cell, node, server, cluster, application, core group, or node group names. Instead, the command creates variables, such as !{cellName}, and includes them in the EnvironmentVariables section at the end of the properties file. The Environment Variables section contains each variable in the properties file.

      The EJBContainer=ID #EJBContainer_1 string represents the EJBContainer object within the server. Use this XML ID to uniquely identify the object in the configuration. We can modify this field to EJBContainer=myContainer if the name field is set to myContainer in the configuration before you apply the properties file to the configuration.

  • Extract node properties without traversing the subtypes of the node.

    1. Start the wsadmin scripting tool.

    2. Extract the node properties, except for specific subtype properties of servers and resources.

      Use the extractConfigProperties command to extract the node configuration properties, as the following Jython examples demonstrates:

        AdminTask.extractConfigProperties('[-propertiesFileName node.props -configData Node=myNode -filterMechanism NO_SUBTYPES]')

      The system extracts the properties file, as the following example displays:

      # 
      # SubSection 1.0 
      # Node Section 
      # 
      ResourceType=Node ImplementingResourceType=Node   
      ResourceId=Cell=!{cellName}:Node=!{nodeName} 
      #  
      # 
      #Properties 
      # shortName=null name=!{nodeName}   
      maxFilePermissionForApps=".*\.dll=755
      #.*\.so=755
      #.*\.a=755
      #.*\.sl=755 " discoveryProtocol=TCP  
      #ENUM(UDP|TCP|MULTICAST)  hostName=!{hostName}  
      # 
      #
      # Section 1.0_1
      #Cell=!{cellName}:Node=!{nodeName}
       
      # ResourceType=Node 
      ImplementingResourceType=Node  
      ExtensionId=NodeMetadataExtension  
      ResourceId=Cell=!{cellName}:Node=!{nodeName}  
      # nodeOS=distributed nodeVersion=7.0.0.0   
      # 
      #   End of Section 1.0_1
      # Cell=!{cellName}:Node=!{nodeName} 
      
      #  
      # 
      # End of Section 1.0
      # Cell=!{cellName}
      :Node=!{nodeName} 
      #   EnvironmentVariablesSection 
      # 
      #Environment Variables 
      #Day Month 17 Time  CDT Year 
      cellName=myCell nodeName=myNode 

      The properties file does not display the cell, node, server, cluster, application, core group, or node group names. Instead, the command creates variables, such as !{cellName}, and includes them in the EnvironmentVariables section at the end of the properties file. The Environment Variables section of the properties file contains each variable in the file.


    Extract node properties without traversing the subtypes of the node or invoking extensions

    1. Start the wsadmin scripting tool.

    2. Extract the node properties, except for specific subtype properties of servers and resources and without invoking extensions.

      Use the extractConfigProperties command to extract the node configuration properties, as the following Jython examples demonstrates:

        AdminTask.extractConfigProperties('[-propertiesFileName node.props -configData Node=myNode -filterMechanism NO_SUBTYPES_AND_EXTENSIONS]')

      The system extracts the properties file, as the following example displays:

      # 
      # SubSection 1.0 
      # Node Section 
      # ResourceType=Node ImplementingResourceType=Node   
      ResourceId=Cell=!{cellName}:Node=!{nodeName} 
      #  
      # 
      #Properties 
      # shortName=null name=!{nodeName}   
      maxFilePermissionForApps=".*\.dll=755
      #.*\.so=755
      #.*\.a=755
      #.*\.sl=755 " discoveryProtocol=TCP  
      #ENUM(UDP|TCP|MULTICAST)  hostName=!{hostName}  
      # 
      #
      # Section 1.0_1
      #Cell=!{cellName}:Node=!{nodeName}
       
      # ResourceType=Node ImplementingResourceType=Node  
      ExtensionId=NodeMetadataExtension  
      ResourceId=Cell=!{cellName}:Node=!{nodeName}  
      # nodeOS=distributed nodeVersion=7.0.0.0   
      # 
      # End of Section 1.0_1
      # Cell=!{cellName}:Node=!{nodeName} 
      #  
      # 
      # End of Section 1.0
      # Cell=!{cellName}:Node=!{nodeName}
       
      #  EnvironmentVariablesSection 
      # 
      #Environment Variables 
      #Day Month 17 Time CDT Year cellName=myCell nodeName=myNode 

      The command excludes the NodeMetadataExtension section from the extracted properties file, as that is an extension to a node resource. The properties file does not display the cell, node, server, cluster, application, core group, or node group names. Instead, the command creates variables, such as !{cellName}, and includes them in the EnvironmentVariables section at the end of the properties file. The Environment Variables section of the properties file contains each variable in the file.


    What to do next

    After extracting properties files, use this functionality for various purposes, including:

    • To modify the existing configuration in one location, instead of configuring multiple console panels or running many commands

    • To improve the application development life cycle

    We can use properties files to manage the following server subtypes in the environment:


    Subtopics


    Related tasks

    Validating properties files
  • Apply properties files
  • Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting
  • Delete server, cluster, application, or authorization group objects using properties files
  • Create and delete configuration objects using properties files and wsadmin scripting
  • Manage environment configurations with properties files
  • Extracting properties files to troubleshoot the environment
  • Manage servers and nodes

  • PropertiesBasedConfiguration (AdminTask)