Sharing sessions for application management

With the configuration service interface, ConfigService, you can create a session that is a temporary staging area, where you can save all the configuration modifications. Saving the session saves all the updates from the session into the WAS configuration repository. The application management logic supports session sharing with the configuration service. You can perform all the application management functions in the same session as the one that the configuration service creates. Saving such a session saves all the updates, including the ones that are application-specific.

 

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.

 

About this task

Perform the following tasks for your deployed application to share and save application-specific updates through the configService configuration service.

 

Procedure

  1. Create a configuration service proxy object.

  2. Create a session.

  3. Pass the session information to the AppManagement MBean.

    Every method on the AppMangement interface takes session ID (workspace ID) as the last parameter. If the session information is passed in this parameter, the application management function uses the session. If you set the parameter to a null value:

    • No session sharing occurs

    • The configuration changes are always saved in the configuration repository if the operation succeeds.

  4. Save the session after all the necessary changes are made.

    The following example outlines the general steps for session sharing through the configService configuration service. For a detailed example, see Manipulating additional attributes for a deployed application .

    public void installApplication (String localEarPath,
                String appName, Hashtable properties, String workspaceID)
                throws AdminException;
    
    AdminClient adminClient = ....;
    
    // Create a configuration service proxy object.
    ConfigService configService = new ConfigServiceProxy(adminClient);
    
    // Create a session.
     Session session = new Session();
    
    // Pass the session information to AppManagement MBean.
    appMgmt = ... 
    appMgmt.installApplication 
                  (earPath, appName, properties, session.toString());
    //Save the session after all necessary changes are made. 
    configService.save(session, false);
     
    
    

 

Results

After you successfully complete the steps, you have saved application-specific updates for a deployed application to a session, and then to the configuration repository.


Related concepts
Application management Related tasks
Installing an application through programming

 



 

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.