Managing applications through programming

The application management support in WebSphere Application Server provides functions, such as installing and uninstalling applications, editing of binding information for installed applications, updating the entire application, and exporting the application. This functionality is provided through the com.ibm.websphere.management.application.AppManagement interface, which is exposed as a JMX-based AppManagement MBean, and can be accessed using code running on the server, or in a standalone administrative client program.

Before you begin

This task assumes a basic familiarity with MBean programming. For information on MBean programming, see MBean Java™ application programming interface (API) documentation. In this information center, click Reference > Mbean interfaces.

Before you can install or change an application on a deployment target, you must first create or update your application and assemble it using an assembly tool.

About this task

Besides installing, uninstalling, and updating applications through programming, you can additionally install, uninstall, and update Java EE applications through the administrative console or the wsadmin tool. All three ways provide identical updating capabilities.

When using WebSphere Application Server Network Deployment, the AppManagement MBean is only present in the deployment manager that facilitates centralized configuration and administration. Similar to config service, the AppManagement functions can also be accessed in the absence of WebSphere Application Server. This mode, known as local mode, is particularly useful for installing J2EE applications as art of the product installation process.

The com.ibm.websphere.management.application.AppManagementProxy class provides uniform access to application management functionality, regardless of whether it is accessed from the server process, administrative client process, or a standalone Java program in the absence of WebSphere Application Server. Accessing the application management function for a description of how to obtain an AppManagementProxy instance in a variety of cases.

Procedure

  1. Perform any or all of the following tasks to manage your Java EE applications through programming.
    • Access the application management function.
      This topic provides examples to access the application management functionality:
      • From WebSphere® Application Server code
      • From outside WebSphere Application Server
      • When WebSphere Application Server is not running
    • Install an application.

      This topic provides an example for initially installing an application on a deployment target such as a server or cluster.

    • Uninstall an application.

      This topic provides an example for uninstalling an application that resides on a deployment target.

    • Manipulate additional attributes for a deployed application.

      This topic provides an example for manipulating attributes that are not exposed through the AppDeploymentTask object.

    • Share sessions for application management.

      This topic provides an example for saving application-specific updates for a deployed application to a session, and then to the configuration repository.

    • Update an application.

      This topic provides an example for updating the installed application on a server or cluster with a new application. When you completely update an application, the deployed application is uninstalled and the new enterprise archive (EAR) file is installed.

    • Add to, update, or delete part of an application.

      This topic provides an example that you can use to add, update, or delete part of an application on a server or cluster.

    • Edit an application.

      This topic provides an example that you can use to edit an application on a server or cluster.

    • Add a module.

      This topic provides an example for adding a module to an application that resides on a server or cluster.

    • Update a module.

      This topic provides an example for updating a module that resides on a server or cluster. When you update a module, the deployed module is uninstalled and the updated module is installed.

    • Delete a module.

      This topic provides an example for deleting a module that resides on a server or cluster. When you delete a module, the deployed module is uninstalled.

    • Add a file.

      This topic provides an example for adding a file to an application that resides on a server or cluster.

    • Update a file.

      This topic provides an example for updating a file on a server or cluster. When you update a file, the deployed file is uninstalled and the updated file is installed.

    • Delete a file.

      This topic provides an example for deleting a file on a server or cluster. When you delete a file, the deployed file is uninstalled.

  2. Save your changes to the master configuration repository.
  3. Synchronize changes to the master configuration across the nodes for the changes to take effect.

What to do next

If you have further application updates, you can do the updates through programming, the administrative console, or the wsadmin tool.

You can use the common deployment framework to add additional logic to application management operations. See Extending application management operations through programming. The tasks that the extensions provide are available through all the administrative clients, such as the wsadmin tool, the administrative console, or through programmatic APIs that the AppManagement MBean provides.




In this information ...


Related 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    

Terms of Use | Feedback

Last updated: Oct 21, 2010 10:04:34 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=TjmxUpdatingApp
File name: tjmx_updating_app.html