+

Search Tips   |   Advanced Search

 

Set background applications using scripting

 

You can enable or disable a background application using scripting and the wsadmin tool. Before starting this task, the wsadmin tool must be running. See the Start the wsadmin scripting client article for more information.

 

Overview

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 you 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 appserver starts.

 

Procedure

  1. Locate the application deployment object for the application. For example:

    • Use Jacl:

      set applicationDeployment [$AdminConfig getid /Deployment:adminconsole/ApplicationDeployment:/]
      

    • Use Jython:

      applicationDeployment = AdminConfig.getid('/Deployment:adminconsole/ApplicationDeployment:/')
      

    where:

    set Jacl command
    applicationDeployment variable name
    $ Jacl operator for substituting a variable name with its value
    AdminConfig object that represents the WebSphere Application Server configuration
    getid AdminConfig command
    Deployment type
    ApplicationDeployment type
    adminconsole name of the application

  2. Enable the background application. For example:

    • Use Jacl:

      $AdminConfig modify $applicationDeployment "{backgroundApplication true}"
      

    • Use Jython:

      AdminConfig.modify(applicationDeployment, ['backgroundApplication', 'true'])
      

    where:

    $ Jacl operator for substituting a variable name with its value
    AdminConfig object that represents the WebSphere Application Server configuration
    modify AdminConfig command
    applicationDeployment variable name that was set in step 1
    backgroundApplication attribute
    true value of the backgroundApplication attribute

  3. Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.

  4. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.



Use the AdminConfig object for scripted administration

 

Related Reference


Commands for the AdminConfig object