+

Search Tips   |   Advanced Search

Set background applications using wsadmin.sh

We can enable or disable a background application using scripting and the wsadmin tool.

Background applications specify whether the application must initialize fully before the server starts. The default setting is false and this indicates that server startup will not complete until the application starts. If we set the value to true, the application starts on a background thread and server startup continues without waiting for the application to start. The application may not ready for use when the application server starts.


Tasks

  1. Start the wsadmin scripting tool.
  2. Locate the application deployment object for the application. For example:

    • Jacl:
      set applicationDeployment [$AdminConfig getid /Deployment:adminconsole/ApplicationDeployment:/]
      
    • Jython:
      applicationDeployment = AdminConfig.getid('/Deployment:adminconsole/ApplicationDeployment:/')
      

    Element Description
    set is a Jacl command
    applicationDeployment is a variable name
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the product configuration
    getid is an AdminConfig command
    Deployment is a type
    ApplicationDeployment is a type
    adminconsole is the name of the application

  3. Enable the background application. For example:

    • Jacl:
      $AdminConfig modify $applicationDeployment "{backgroundApplication true}"
      
    • Jython:
      AdminConfig.modify(applicationDeployment, ['backgroundApplication', 'true'])
      

    Element Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the product configuration
    modify is an AdminConfig command
    applicationDeployment is a variable name that was set in step 1
    backgroundApplication is an attribute
    true is the value of the backgroundApplication attribute

  4. Save the configuration changes.
    AdminConfig.save()
    
  5. Synchronize the node.

    Use the syncActiveNode or syncNode scripts in the AdminNodeManagement script library to propagate the configuration changes to node or nodes.

    • Use the syncActiveNodes script to propagate the changes to each node in the cell:
      AdminNodeManagement.syncActiveNodes()
      

    • Use the syncNode script to propagate the changes to a specific node:
      AdminNodeManagement.syncNode("myNode")
      

  • Start the wsadmin scripting client
  • Configure application startup
  • wsadmin AdminConfig
  • Commands for the AdminConfig object