Manage applications through programming
Through Java MBean programming, you can install, update, and delete a J2EE application on WebSphere Application Server. This task assumes a basic familiarity with MBean programming. For information on MBean programming, see MBean Java application programming interface (API) documentation.
For information on the restarting of updated applications, refer to Fine-grained recycle behavior in IBM WebSphere Developer Technical Journal: System management for WebSphere Application Server V6 -- Part 5 Flexible options for updating deployed applications.
Before you can install or change an application on WAS, first create or update your application and assemble it using an assembly tool.
Overview
Besides installing, uninstalling, and updating applications through programming, you can additionally install, uninstall, and update J2EE applications through the console or the wsadmin tool. All three ways provide identical updating capabilities.
Procedure
- Perform any or all of the following tasks to manage your J2EE applications through programming.
- Access the application management function.This topic provides examples to access the application management functionality:
- From WAS code
- From outside WAS
- When WAS is not running
- Install an application.
This topic provides an example for initially installing an application on WAS.
- Uninstall an application.
This topic provides an example for uninstalling an application that resides on WAS.
- 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 WAS 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 used to to add, update, or delete part of an application on WAS.
- Edit an application.
This topic provides an example used to to edit an application on WebSphere Application Server.
- Add a module.
This topic provides an example for adding a module to an application that resides on WAS.
- Update a module.
This topic provides an example for updating a module that resides on WAS. 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 WAS. 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 WAS.
- Update a file.
This topic provides an example for updating a file on WAS. 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 WAS. When you delete a file, the deployed file is uninstalled.
- Save your 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 you have further application updates, you can do the updates through programming, the console, or the wsadmin tool.
Application management
Accessing the application management function
Installing an application through programming
Uninstall an application through programming
Manipulating additional attributes for a deployed application
Sharing sessions for application management
Updating an application through programming
Adding to, updating, or deleting part of an application through programming
Edit applications
Preparing a module and adding it to an existing application through programming
Preparing and updating a module through programming
Deleting a module through programming
Adding a file through programming
Updating a file through programming
Deleting a file through programming
Related concepts
Ways to update application files
Related tasks
Hot deployment and dynamic reloading
Deploying and administering J2EE applications
Getting started with scripting
Related information
Assembling applications