Manage applications using AppManagement MBean programming
Through Java MBean programming, we can install, update, and delete a Java Platform, Enterprise Edition (Java EE) application on a WebSphere Application Server deployment target.
For information on the restarting of updated applications, refer to Fine-grained recycle behavior in IBM WebSphere Developer Technical Journal: System management for WAS V6 -- Part 5 Flexible options for updating deployed applications.
Before we can install or change an application on a deployment target, we must first create or update the application and assemble it using an assembly tool.
Besides installing, uninstalling, and updating applications through programming, we can additionally install, uninstall, and update Java EE applications through the administrative console or the wsadmin tool. All three ways provide identical updating capabilities.
Tasks
- Perform any or all of the following tasks to manage your Java EE applications through programming.
- Access the application management function.
See the following examples to access the application management functionality:
- From WAS code
- From outside WAS
- When WAS is not running
- Install an application.
See the example for initially installing an application on a deployment target such as a server or cluster.
- Uninstall an application.
See the example for uninstalling an application that resides on a deployment target.
- Manipulate additional attributes for a deployed application.
See the example for manipulating attributes that are not exposed through the AppDeploymentTask object.
- Share sessions for application management.
See the example for saving application-specific updates for a deployed application to a session, and then to the configuration repository.
- Update an application.
See the example for updating the installed application on a server or cluster with a new application. When we completely update an application, the deployed application is uninstalled and the new EAR file is installed.
- Add to, update, or delete part of an application.
See the example we can use to add, update, or delete part of an application on a server or cluster.
- Edit an application.
See the example we can use to edit an application on a server or cluster.
- Add a module.
See the example for adding a module to an application that resides on a server or cluster.
- Update a module.
See the example for updating a module that resides on a server or cluster. When we update a module, the deployed module is uninstalled and the updated module is installed.
- Delete a module.
See the example for deleting a module that resides on a server or cluster. When we delete a module, the deployed module is uninstalled.
- Add a file.
See the example for adding a file to an application that resides on a server or cluster.
- Update a file.
See the example for updating a file on a server or cluster. When we update a file, the deployed file is uninstalled and the updated file is installed.
- Delete a file.
See the example for deleting a file on a server or cluster. When we delete a file, the deployed file is uninstalled.
- Save changes to the master configuration repository.
- Synchronize changes to the master configuration across the nodes for the changes to take effect.
What to do next
If we have further application updates, we can do the updates through programming, the administrative console, or the wsadmin tool.
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.
Subtopics
- Accessing the application management function
- Install an application through programming
- Application management
- Starting an application through programming
- Sharing sessions for application management
- Manipulating additional attributes for a deployed application
- Editing applications
- Update an application through programming
- Add to, update, or delete part of an application through programming
- Prepare a module and adding it to an existing application through programming
- Prepare and updating a module through programming
- Add a file through programming
- Update a file through programming
- Uninstall an application through programming
- Delete a module through programming
- Delete a file through programming
Related:
Ways to install enterprise applications or modules Ways to update enterprise application files Deploy and administering enterprise applications Get started with wsadmin scripting Assemble applications Extending application management operations through programming