WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

Setting background applications using scripting

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

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

About this task

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 application server starts.

Procedure

  1. Locate the application deployment object for the application. For example:
    • Using Jacl:
      set applicationDeployment [$AdminConfig getid /Deployment:adminconsole/ApplicationDeployment:/]
    • Using Jython:
      applicationDeployment = AdminConfig.getid('/Deployment:adminconsole/ApplicationDeployment:/')
    where:
    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 WebSphere Application Server configuration
    getid is an AdminConfig command
    Deployment is a type
    ApplicationDeployment is a type
    adminconsole is the name of the application
  2. Enable the background application. For example:
    • Using Jacl:
      $AdminConfig modify $applicationDeployment "{backgroundApplication true}"
    • Using Jython:
      AdminConfig.modify(applicationDeployment, ['backgroundApplication', 'true'])
    where:
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the WebSphere Application Server 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
  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.



Related tasks
Using the AdminConfig object for scripted administration
Related reference
Commands for the AdminConfig object
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_background.html

© Copyright IBM Corporation 2004, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)