WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Starting applications with scripting

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.

Why and when to perform this task

Perform the following steps to start an application:

Steps for this task

  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



Related concepts
AdminControl object for scripted administration

Related tasks
Installing applications with the wsadmin tool

Related reference
Commands for the AdminControl object

Task topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_startapplication.html

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