WAS v8.5 > Script the application serving environment (wsadmin) > Manage deployed applications using wsadmin.sh

Start applications using wsadmin.sh

Use scripting and wsadmin to start an application not running.


Before beginning

There are two ways to complete this task. This topic uses the AdminControl object to start an application. Alternatively, we can use the scripts in the AdminApplication script library to start, stop, and manage applications.

  1. Start the wsadmin scripting tool.

  2. 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.

    • Jacl:

       set appManager [$AdminControl queryNames cell=mycell,node=mynode,type
      =ApplicationManager,
      process=server1,*]
    • Jython:

      appManager = AdminControl.queryNames('cell=mycell,node=mynode,type
      =ApplicationManager,
      process=server1,*')
      print appManager

    Example output:

    WebSphere:cell=mycell,name=ApplicationManager,mbeanIdentifier=ApplicationManager,
    type=ApplicationManager,node=mynode,process=server1
  3. Start the application. The following example invokes the startApplication operation on the MBean, providing the application name to start.

    • Jacl:

        $AdminControl invoke $appManager startApplication myApplication
    • Jython:

        AdminControl.invoke(appManager, 'startApplication', 'myApplication')


Related


Start or stop enterprise applications
Use the wsadmin scripting AdminControl object for scripted administration
Install enterprise applications using wsadmin.sh
:

Application administration scripts
Commands for the AdminControl object using wsadmin.sh


Related information:

Start business-level applications using scripting


+

Search Tips   |   Advanced Search