Starting applications with scripting

Use scripting and the wsadmin tool to start applications.

Before you begin

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

You must install the application before starting it. See the Installing applications with the wsadmin tool article for more information.

About this task

Perform the following steps to start an application:

Procedure

  1. Identify the application manager MBean for the server where the application resides and assign it the appManager variable. The following example returns the name of the application manager MBean.
    • Using Jacl:
       set appManager [$AdminControl queryNames cell=mycell,node=mynode,type=ApplicationManager,process=server1,*]
    • Using Jython:
      appManager = AdminControl.queryNames('cell=mycell,node=mynode,type=ApplicationManager,process=server1,*')
      print appManager
    where:
    set is a Jacl command
    appManager is a variable name
    $ is a Jacl operator for substituting a variable name with its value
    AdminControl is an object that enables the manipulation of MBeans running in a WebSphere Application Server process
    queryNames is an AdminControl command
    cell=mycell,node=mynode,type=ApplicationManager,process=server1 is the hierarchical containment path of the configuration object
    print is a Jython command
    Example output:
    WebSphere:cell=mycell,name=ApplicationManager,mbeanIdentifier=ApplicationManager,
    type=ApplicationManager,node=mynode,process=server1
  2. Start the application. The following example invokes the startApplication operation on the MBean, providing the application name that you want to start.
    • Using Jacl:
      $AdminControl invoke $appManager startApplication myApplication
    • Using Jython:
      AdminControl.invoke(appManager, 'startApplication', 'myApplication')
    where:
    $ is a Jacl operator for substituting a variable name with its value
    AdminControl is an object that enables the manipulation of MBeans running in a WebSphere Application Server process
    invoke is an AdminControl command
    appManager evaluates to the ID of the server that is specified in step number 1
    startApplication is an attribute of the modify command
    myApplication is the value of the startApplication attribute



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 6:03:36 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-base-iseries&topic=txml_startapplication
File name: txml_startapplication.html