+

Search Tips   |   Advanced Search

Work with application server properties files

Use properties files to create or change application server properties and the associated StateManageable instance under a server.

Determine the changes to make to the application server configuration.

Start the wsadmin scripting tool. To start wsadmin using the Jython language, run...

Use a properties file to create, modify, or delete an application server properties.

Run administrative commands using wsadmin to create or change a properties file for an application server, validate the properties, and apply them to the configuration.

Action Procedure
create Not available
modify Edit properties and then run the applyConfigProperties command.
delete Not available
create Property Set properties and then run the applyConfigProperties command.
delete Property Run the deleteConfigProperties command.

Optionally, we can use interactive mode with the commands:

AdminTask.command_name('-interactive')


Modify a properties file for an ApplicationServer object

  1. Obtain a properties file for the application server to change.

    We can extract a properties file for an Application Server using the extractConfigProperties command.

  2. Open the properties file in an editor and change the properties as needed.

    For example, modify the ApplicationServer and associated StateManageable under a server. The following properties file shows a property under ApplicationServer with name myName and value myVal:

    #
    # Header
    #
    ResourceType=ApplicationServer
    ImplementingResourceType=ApplicationServer
    ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=
    AttributeInfo=components
    #
    
    #
    #Properties
    #
    applicationClassLoaderPolicy=MULTIPLE #ENUM(MULTIPLE|SINGLE),default(MULTIPLE)
    name=null
    applicationClassLoadingMode=PARENT_FIRST #ENUM(PARENT_FIRST|PARENT_LAST),default(PARENT_FIRST)
    server=!{serverName}
    parentComponent=null
    id=-1 #long,default(-1)
    
    
    #
    # Header
    #
    ResourceType=StateManageable
    ImplementingResourceType=ApplicationServer
    ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:StateManageable=
    AttributeInfo=stateManagement
    #
    
    #
    #Properties
    #
    initialState=START #ENUM(STOP|START),default(START)
    managedObject=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer= #ObjectName(ApplicationServer),readonly
    
    
    #
    # Header
    #
    ResourceType=ApplicationServer
    ImplementingResourceType=ApplicationServer
    ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=
    AttributeInfo=properties(name,value)
    #
    
    #
    #Properties
    #
    myName=myVal
    #
    
    EnvironmentVariablesSection
    #
    #Environment Variables
    cellName=WASCell06
    serverName=myServer
    nodeName=WASNode04
    

  3. Run the applyConfigProperties command to change an application server configuration and create any new properties.

    Running the applyConfigProperties command applies the properties file to the configuration. In this Jython example, the optional -reportFileName parameter produces a report named report.txt:

      AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt'])


Delete application server properties

To delete one or more properties, specify only those properties to delete in the properties file and run deleteConfigProperties; for example:

AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]') 

Use the properties file to configure and manage the application server object.


What to do next

Save the changes to the configuration.


Subtopics


  • Extracting properties files
  • Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting
  • Deleting server, cluster, application, or authorization group objects using properties files
  • PropertiesBasedConfiguration .