com.ibm.websphere.management.application

Interface AppManagement

  • All Known Implementing Classes:
    AppManagementProxy


    public interface AppManagement
    The AppManagement interface provides APIs for managing J2EE applications in WebSphere cell. The management functions for J2EE applications include installation, uninstallation, upgrade, application editing, application export etc.
    The AppManagementProxy class provides static APIs to instantiate/locate an implementation for AppManagement interface. The management functions exposed by this interface can be invoked in local mode or JMX mode. The local mode assumes that the WebSphere server is not running and performs direct manipulation of configuration documents. The JMX mode performs management functions by communicating with AppManagement MBean running in a WebSphere server. A single instance of AppManagement MBean is present in a WebSphere server process that can perform configuration updates (such as deployment manager process in Network Deployment configuration or the only server process in a single-server configuration). The AppManagement implementation should never be used in local mode when a WebSphere JMX server is running as it can conflict with the changes made by the AppManagement MBean running in the server process.

    Note: All the AppManagement APIs take workspaceID as a parameter. A workspace is a temporary copy of WebSphere configuration documents made available to a single user. A user can create a workspace, make changes to configuration documents in it and then save the workspace which checks in the updated documents to WebSphere configuration repository. The workspace ID passed in any of the AppManagement APIs can be null. In such cases the AppManagement logic creats the workspace, makes necessary updates to it and then saves the workspace changes to the repository if the API succeeds. If a workspace ID is passed in then AppManagement function uses given workspace but does not save or discard it. It is caller's responsibility to save the workspace changes to WebSphere configuration repository. Typically users of ConfigService get workspace ID from a ConfigService session and pass it to the AppManagement APIs.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void changeServerToCluster(javax.management.ObjectName serverName, javax.management.ObjectName clusterName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Callback for admin clients when a server is turned into a cluster.
      boolean checkIfAppExists(java.lang.String appName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Checks if an application with the given name is installed in the configuration.
      void clusterMemberAdded(javax.management.ObjectName memberName, javax.management.ObjectName clusterName, java.util.Hashtable prefs, java.lang.String wID)
      Callback for admin clients when a cluster member is added.
      java.util.Vector compareSecurityPolicy(java.lang.String policyData, java.util.Hashtable preferences, java.lang.String workspaceID)
      Compares the policy data from was.policy file of the ear file with the filter.policy file from WebSphere.
      java.util.List convertRefToConfigID(java.lang.String appName, java.util.List resources, java.util.Hashtable prefs, java.lang.String wID)
      Returns a list that contains information of the resources referenced in the specified application.
      void deleteUserAndGroupEntries(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID)
      Deletes all the security binding information related to users and groups from application metadata.
      void exportApplication(java.lang.String appName, java.lang.String pathName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Exports the application to a given file.
      void extractDDL(java.lang.String appName, java.lang.String ddlPrefix, java.lang.String dirName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Exports Table.ddl from all the jars in the ear
      java.lang.String[] getAppAssociation(java.lang.String scope, java.lang.String retVal, java.util.Hashtable prefs, java.lang.String wID)
      Gets association between application and targets.
      byte[] getApplicationContents(java.lang.String appName, java.lang.String uri, java.util.Hashtable prefs, java.lang.String sessionID)
      Returns a byte array for contents of a file within the application EAR.
      java.util.Vector getApplicationInfo(java.lang.String appName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Returns a Vector of AppDeploymentTask objects.
      void getDistributionStatus(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID)
      Returns the status of application distribution on each node that the app is supposed to run on.
      EditionInfo[] getEditionInfo(java.lang.String appName, java.lang.String edition, java.util.Hashtable prefs, java.lang.String wID)
      Gets edition information for the application edition(s).
      java.util.Hashtable getGlobalSettings() 
      java.util.Vector getModuleInfo(java.lang.String appName, java.util.Hashtable prefs, java.lang.String uniqueModuleURI, java.lang.String workspaceID)
      Returns a Vector of AppDeploymentTask objects.
      void installApplication(java.lang.String localEarPath, java.util.Hashtable properties, java.lang.String workspaceID)
      Installs a J2EE application in WebSphere cell.
      void installApplication(java.lang.String localEarPath, java.lang.String appName, java.util.Hashtable properties, java.lang.String workspaceID)
      Installs a J2EE application with the given name in WebSphere cell.
      void installApplicationLocal(java.lang.String localEarPath, java.lang.String appName, java.util.Hashtable properties, AppNotification.Listener notf)
      Installs a J2EE application with the given name in WebSphere cell.
      void installApplicationLocal(java.lang.String localEarPath, java.lang.String appName, java.util.Hashtable properties, AppNotification.Listener notf, java.lang.String workspaceID)
      Installs a J2EE application with the given name in WebSphere cell.
      void installStandaloneRAR(java.lang.String rarPath, java.util.Hashtable props, java.lang.String workspaceID)
      Deprecated. 
      Use ConfigService instead. Installs a standalone RAR file. This method creates a J2CResourceAdapter in the resources.xml file in the scope specified by the properties. The user has to manually extract the RAR file at the destination location.
      java.util.Vector listApplications(java.util.Hashtable prefs, java.lang.String wID)
      Lists installed applications.
      java.util.Vector listApplications(java.lang.String targetScope, java.util.Hashtable props, java.lang.String sessionID)
      Lists applications on a given target.
      java.lang.Object listModules(java.lang.String appName, java.util.Hashtable preferences, java.lang.String workspaceID)
      Lists modules of an application.
      java.util.Vector listSystemApplications(java.util.Hashtable prefs, java.lang.String workspaceID)
      Lists system applications.
      java.util.List listURIs(java.lang.String appName, java.lang.String moduleURI, java.util.Hashtable prefs, java.lang.String sessionID)
      Lists URIs in the EAR or one of its archives (module or non module archives).
      void moveModule(java.lang.String appName, java.util.Hashtable prefs, java.lang.String uniqueModuleURI, javax.management.ObjectName on, java.lang.String workspaceID)
      Deprecated. 
      Replaced by setModuleInfo Moves a module from server-server, server-cluster, cluster-server, cluster-cluster.
      void publishWSDL(java.lang.String appName, java.lang.String pathName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Publish wsdl files to a zip file
      void redeployApplication(java.lang.String localEarPath, java.lang.String appName, java.util.Hashtable properties, java.lang.String workspaceID)
      Updates an installed J2EE application with a new version of its binaries.
      void redeployApplicationLocal(java.lang.String localEarPath, java.lang.String appName, java.util.Hashtable properties, AppNotification.Listener notf, java.lang.String workspaceID)
      Updates an installed J2EE application with a new version of its binaries.
      void removeAllAppsFromCluster(javax.management.ObjectName objectName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Callback for admin clients when a cluster is removed.
      void removeAllAppsFromNode(java.lang.String nodeName, java.lang.String cellName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Removes all the applications from all the servers of a given node.
      void removeAllAppsFromServer(javax.management.ObjectName objectName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Callback for admin clients when a server is removed.
      void renameApplication(java.lang.String appName, java.lang.String newAppName, java.util.Hashtable prefs, java.lang.String workspaceID)
      Renames an application.
      void renameApplicationLocal(java.lang.String appName, java.lang.String newAppName, java.util.Hashtable prefs, AppNotification.Listener notf, java.lang.String workspaceID)
      Renames an application.
      java.util.Hashtable searchJNDIReferences(java.util.List sList, java.lang.String nodes, java.util.Hashtable prefs, java.lang.String wID)
      Returns a hashtable that includes the information of the applications that has references to the specified JndiNames.
      java.util.List searchResources(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID) 
      void sendJMXEvent(java.lang.Object userData) 
      void sendJMXEvent(java.lang.String type, java.lang.Object userData) 
      void setApplicationInfo(java.lang.String appName, java.util.Hashtable prefs, java.lang.String workspaceID, java.util.Vector tasks)
      Sets the new binding information for an installed application.
      void setApplicationInfoLocal(java.lang.String appName, java.util.Hashtable prefs, java.lang.String workspaceID, java.util.Vector tasks, AppNotification.Listener notf)
      Sets the new binding information for an installed application.
      void setEditionInfo(EditionInfo[] info, java.util.Hashtable prefs, java.lang.String wID)
      Sets edition information for the application.
      void setModuleInfo(java.lang.String appName, java.util.Hashtable prefs, java.lang.String uniqueModuleURI, java.lang.String workspaceID, java.util.Vector tasks)
      Sets the new binding information for an installed application module.
      void setModuleInfoLocal(java.lang.String appName, java.util.Hashtable prefs, java.lang.String uniqueModuleURI, java.lang.String workspaceID, java.util.Vector tasks, AppNotification.Listener notf)
      Sets the new binding information for an installed application module.
      java.lang.String startApplication(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID) 
      java.lang.String startApplication(java.lang.String appName, java.lang.String target, java.util.Hashtable prefs, java.lang.String wID) 
      java.lang.String stopApplication(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID) 
      java.lang.String stopApplication(java.lang.String appName, java.lang.String target, java.util.Hashtable prefs, java.lang.String wID) 
      void uninstallApplication(java.lang.String appName, java.util.Hashtable props, java.lang.String workspaceID)
      Uninstalls an application from WebSphere cell.
      void uninstallApplicationLocal(java.lang.String appName, java.util.Hashtable props, AppNotification.Listener notf)
      Uninstalls an application from WebSphere cell.
      void uninstallApplicationLocal(java.lang.String appName, java.util.Hashtable props, AppNotification.Listener notf, java.lang.String workspaceID)
      Uninstalls an application from WebSphere cell.
      void updateAccessIDs(java.lang.String appName, java.lang.Boolean bAll, java.util.Hashtable prefs, java.lang.String wID)
      Populates the application bindings of the deployment with the access IDs for all the users and groups.
      void updateApplication(java.lang.String appName, java.lang.String contentURI, java.lang.String pathToContents, java.lang.String operation, java.util.Hashtable properties, java.lang.String sessionID)
      Upatates an installed application using various update inputs such as a single file, module, partial application or a complete application.
      void updateApplicationLocal(java.lang.String appName, java.lang.String contentURI, java.lang.String pathToContents, java.lang.String operation, java.util.Hashtable properties, AppNotification.Listener notf, java.lang.String sessionID)
      Upatates an installed application using various update inputs such as a single file, module, partial application or a complete application.
      void updateCluster(java.lang.String[] appNames, java.lang.Integer timeout, java.util.Hashtable props, java.lang.String wsId) 
      void updateClusterLocal(java.lang.String[] appNames, java.lang.Integer timeout, java.util.Hashtable props, java.lang.String wsId, AppNotification.Listener notif) 
    • Method Detail

      • installApplication

        void installApplication(java.lang.String localEarPath,
                              java.lang.String appName,
                              java.util.Hashtable properties,
                              java.lang.String workspaceID)
                                throws AdminException
        Installs a J2EE application with the given name in WebSphere cell. This is an asynchronous call to AppManagement MBean. The caller should register for MBean events to listen to the progress of installation.
        Parameters:
        localEarPath - Fully qualified ear file name. The EAR file must be on the same machine where the MBean is running.
        appName - The application name. If specified, this name overrides the name specified in properties table or in application's deployment descriptor.
        properties - The app install properties table
        workspaceID - The workspace ID.
        Throws:
        AdminException - Throws AdminException if install fails.
      • installApplicationLocal

        void installApplicationLocal(java.lang.String localEarPath,
                                   java.lang.String appName,
                                   java.util.Hashtable properties,
                                   AppNotification.Listener notf)
                                     throws AdminException
        Installs a J2EE application with the given name in WebSphere cell. This is a local implementation used by local clients that run without the presence of a WebSphere server. This is an asynchronous call. The caller should pass in a listener object to learn about progress of installation. This method should only be invoked when AppManagement instance is created in local mode.
        Parameters:
        localEarPath - Fully qualified name of local ear file.
        appName - The application name
        properties - The app install properties table
        notf - A local event listener that the AppManagement logic notifies of installation progress.
        Throws:
        AdminException - Throws AdminException if install fails.
      • installApplicationLocal

        void installApplicationLocal(java.lang.String localEarPath,
                                   java.lang.String appName,
                                   java.util.Hashtable properties,
                                   AppNotification.Listener notf,
                                   java.lang.String workspaceID)
                                     throws AdminException
        Installs a J2EE application with the given name in WebSphere cell. This is a local implementation used by local clients that run without the presence of a WebSphere server. This is an asynchronous call. The caller should pass in a listener object to learn about progress of installation. This method should only be invoked when AppManagement instance is created in local mode.
        Parameters:
        localEarPath - Fully qualified name of local ear file
        appName - The application name
        properties - The app install properties table
        notf - A local event listener that the AppManagement logic notifies of installation progress.
        workspaceID - The workspace ID.
        Throws:
        AdminException - Throws AdminException if install fails.
      • uninstallApplicationLocal

        void uninstallApplicationLocal(java.lang.String appName,
                                     java.util.Hashtable props,
                                     AppNotification.Listener notf)
                                       throws AdminException
        Uninstalls an application from WebSphere cell. The application is removed from all the target servers and clusters. This is an asynchronous call. The caller should pass in a listener object to learn about progress of installation. This method should only be invoked when AppManagement instance is created in local mode.
        Parameters:
        appName - The name of installed application
        props - A properties table to specify additional preferences for uninstallation. The table can contain properties locale and handback object.
        notf - A local event listener that the AppManagement logic notifies of uninstallation progress.
        Throws:
        AdminException - Throws AdminException if uninstall fails.
      • uninstallApplicationLocal

        void uninstallApplicationLocal(java.lang.String appName,
                                     java.util.Hashtable props,
                                     AppNotification.Listener notf,
                                     java.lang.String workspaceID)
                                       throws AdminException
        Uninstalls an application from WebSphere cell. The application is removed from all the target servers and clusters. This is an asynchronous call. The caller should pass in a listener object to learn about progress of installation. This method should only be invoked when AppManagement instance is created in local mode.
        Parameters:
        appName - The name of installed application
        props - A properties table to specify additional preferences for uninstallation. The table can contain properties locale and handback object.
        notf - A local event listener that the AppManagement logic notifies of uninstallation progress.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if uninstall fails.
      • uninstallApplication

        void uninstallApplication(java.lang.String appName,
                                java.util.Hashtable props,
                                java.lang.String workspaceID)
                                  throws AdminException
        Uninstalls an application from WebSphere cell. The application is removed from all the target servers and clusters. This is an asynchronous call to AppManagement MBean. The caller should register for MBean events to listen to the progress of uninstallation. When configuration changes are saved the application binaries are deleted from all the nodes that the application runs on. The application is stopped prior to deleting binaries.

        Sample code to uninstall application:- Refer to sample code for installing an application for creating AppManagementProxy object and adding a JMX listener to listen to AppManagement MBean events.
        
         Hashtable props = new Hashtable();
         props.put (AppConstants.APPDEPL_LOCALE, Locale.getDefault()):
         appM.uninstallApplication (appName, props, null);
         
        Parameters:
        appName - The name of installed application
        props - A properties table to specify additional preferences for uninstallation. The table can contain properties locale and handback object.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if uninstall fails.
      • redeployApplicationLocal

        void redeployApplicationLocal(java.lang.String localEarPath,
                                    java.lang.String appName,
                                    java.util.Hashtable properties,
                                    AppNotification.Listener notf,
                                    java.lang.String workspaceID)
                                      throws AdminException
        Updates an installed J2EE application with a new version of its binaries. The older version of the application is uninstalled and the newer version is installed. When the configuration is saved (and synchronized in ND configuration) the new binaries are extracted in the install destination. If the old application was running then it is stopped prior to replacing the binaries and restarted after binaries are extracted. This is an asynchronous call. The caller should pass in a listener object to learn about progress of update. This method should only be invoked when AppManagement instance is created in local mode.
        Parameters:
        localEarPath - Fully qualified ear file name
        appName - The application name
        properties - The app install properties table
        notf - A local event listener that the AppManagement logic notifies of update progress.
        workspaceID - The workspaceID
        Throws:
        AdminException - Throws AdminException if redeployment fails.
      • redeployApplication

        void redeployApplication(java.lang.String localEarPath,
                               java.lang.String appName,
                               java.util.Hashtable properties,
                               java.lang.String workspaceID)
                                 throws AdminException
        Updates an installed J2EE application with a new version of its binaries. The older version of the application is uninstalled and the newer version is installed. When the configuration is saved (and synchronized in ND configuration) the new binaries are extracted in the install destination. If the old application was running then it is stopped prior to replacing the binaries and restarted after binaries are extracted. This is an asynchronous call to AppManagement MBean. The caller should register for MBean events to listen to the progress of update.

        Sample code for application update:-
        Refer to sample code for installApplication.
        Parameters:
        localEarPath - Fully qualified ear file name
        appName - The application name
        properties - The app install properties table
        workspaceID - The workspaceID
        Throws:
        AdminException - Throws AdminException if redeployment fails.
      • getApplicationInfo

        java.util.Vector getApplicationInfo(java.lang.String appName,
                                          java.util.Hashtable prefs,
                                          java.lang.String workspaceID)
                                            throws AdminException
        Returns a Vector of AppDeploymentTask objects. A task represents a step in collecting application-specific binding information (such as virtual hosts for web modules or JNDI names for EJBs) during application installation or editing. Each task contains a two-dimensional array of Strings containing task-specific data. The caller can manipulate the returned tasks and call setApplicationInfo to set the new binding information in the installed application.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Returns:
        The application tasks
        Throws:
        AdminException - Throws AdminException if operation fails.
      • getModuleInfo

        java.util.Vector getModuleInfo(java.lang.String appName,
                                     java.util.Hashtable prefs,
                                     java.lang.String uniqueModuleURI,
                                     java.lang.String workspaceID)
                                       throws AdminException
        Returns a Vector of AppDeploymentTask objects. A task represents a step in collecting application-specific binding information (such as virtual hosts for web modules or JNDI names for EJBs) during application installation or editing. Each task contains a two-dimensional array of Strings containing task-specific data. The caller can manipulate the returned tasks and call setModuleInfo to set the new binding information in the installed module.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        uniqueModuleURI - The unique module URI string.
        workspaceID - The workspace ID
        Returns:
        The module-specific tasks
        Throws:
        AdminException - Throws AdminException if operation fails.
      • setApplicationInfo

        void setApplicationInfo(java.lang.String appName,
                              java.util.Hashtable prefs,
                              java.lang.String workspaceID,
                              java.util.Vector tasks)
                                throws AdminException
        Sets the new binding information for an installed application. The binding information is represented by a set of AppDeploymentTask objects. A task represents a step in collecting application-specific binding information (such as virtual hosts for web modules or JNDI names for EJBs) during application installation or editing. Each task contains a two-dimensional array of Strings containing task-specific data.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        tasks - The vector of tasks
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • setApplicationInfoLocal

        void setApplicationInfoLocal(java.lang.String appName,
                                   java.util.Hashtable prefs,
                                   java.lang.String workspaceID,
                                   java.util.Vector tasks,
                                   AppNotification.Listener notf)
                                     throws AdminException
        Sets the new binding information for an installed application. The binding information is represented by a set of AppDeploymentTask objects. A task represents a step in collecting application-specific binding information (such as virtual hosts for web modules or JNDI names for EJBs) during application installation or editing. Each task contains a two-dimensional array of Strings containing task-specific data. The caller should pass in a listener object to learn about progress of edit. This method should only be invoked when AppManagement instance is created in local mode.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        tasks - The vector of tasks
        workspaceID - The workspace ID
        notf - A local event listener that the AppManagement logic notifies of edit progress.
        Throws:
        AdminException - Throws AdminException if operation fails.
      • setModuleInfo

        void setModuleInfo(java.lang.String appName,
                         java.util.Hashtable prefs,
                         java.lang.String uniqueModuleURI,
                         java.lang.String workspaceID,
                         java.util.Vector tasks)
                           throws AdminException
        Sets the new binding information for an installed application module. The binding information is represented by a set of AppDeploymentTask objects. A task represents a step in collecting application-specific binding information (such as virtual hosts for web modules or JNDI names for EJBs) during application installation or editing. Each task contains a two-dimensional array of Strings containing task-specific data.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        uniqueModuleURI - The unique module URI string.
        workspaceID - The workspace ID
        tasks - The vector of tasks
        Throws:
        AdminException - Throws AdminException if operation fails.
      • setModuleInfoLocal

        void setModuleInfoLocal(java.lang.String appName,
                              java.util.Hashtable prefs,
                              java.lang.String uniqueModuleURI,
                              java.lang.String workspaceID,
                              java.util.Vector tasks,
                              AppNotification.Listener notf)
                                throws AdminException
        Sets the new binding information for an installed application module. The binding information is represented by a set of AppDeploymentTask objects. A task represents a step in collecting application-specific binding information (such as virtual hosts for web modules or JNDI names for EJBs) during application installation or editing. Each task contains a two-dimensional array of Strings containing task-specific data. The caller should pass in a listener object to learn about progress of edit. This method should only be invoked when AppManagement instance is created in local mode.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        uniqueModuleURI - The unique module URI string.
        workspaceID - The workspace ID
        tasks - The vector of tasks
        notf - A local event listener that the AppManagement logic notifies of edit progress.
        Throws:
        AdminException - Throws AdminException if operation fails.
      • moveModule

        void moveModule(java.lang.String appName,
                      java.util.Hashtable prefs,
                      java.lang.String uniqueModuleURI,
                      javax.management.ObjectName on,
                      java.lang.String workspaceID)
                        throws AdminException
        Deprecated. Replaced by setModuleInfo Moves a module from server-server, server-cluster, cluster-server, cluster-cluster.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        uniqueModuleURI - The unique module URI string.
        on - The JMX object name of destination.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • exportApplication

        void exportApplication(java.lang.String appName,
                             java.lang.String pathName,
                             java.util.Hashtable prefs,
                             java.lang.String workspaceID)
                               throws AdminException
        Exports the application to a given file.
        Parameters:
        appName - The application name
        pathName - The destination file name
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • extractDDL

        void extractDDL(java.lang.String appName,
                      java.lang.String ddlPrefix,
                      java.lang.String dirName,
                      java.util.Hashtable prefs,
                      java.lang.String workspaceID)
                        throws AdminException
        Exports Table.ddl from all the jars in the ear
        Parameters:
        appName - The application name
        ddlPrefix - The prefix for DDL files
        dirName - The destination dir name
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • publishWSDL

        void publishWSDL(java.lang.String appName,
                       java.lang.String pathName,
                       java.util.Hashtable prefs,
                       java.lang.String workspaceID)
                         throws AdminException
        Publish wsdl files to a zip file
        Parameters:
        appName - the name of application for which publishWSDL will be executed.
        pathName - the location where the wsdl file to be published. This path has to be valid before calling this method.
        prefs - contains both Locale and a nested data structure (AttributeList) for port endpoint addresses {moduleName {transport address}+}*
        workspaceID - the id to identify the current workspace
        Throws:
        AdminException - Throws AdminException if operation fails.
      • listApplications

        java.util.Vector listApplications(java.util.Hashtable prefs,
                                        java.lang.String wID)
                                          throws AdminException
        Lists installed applications.
        Parameters:
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Returns:
        An array of application names
        Throws:
        AdminException - Throws AdminException if operation fails.
      • listModules

        java.lang.Object listModules(java.lang.String appName,
                                   java.util.Hashtable preferences,
                                   java.lang.String workspaceID)
                                     throws AdminException
        Lists modules of an application.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Returns:
        An instance of com.ibm.websphere.management.application.AppDeploymentTask that lists module information. The two dimensional array of String data in the task instance specifies the module name, unique module URI and the module targets.
        Throws:
        AdminException - Throws AdminException if operation fails.
      • compareSecurityPolicy

        java.util.Vector compareSecurityPolicy(java.lang.String policyData,
                                             java.util.Hashtable preferences,
                                             java.lang.String workspaceID)
                                               throws AdminException
        Compares the policy data from was.policy file of the ear file with the filter.policy file from WebSphere. If there is any policy in was.policy file that appears in the filter.policy, an exception is thrown. For custom permissions defined in was.policy a vector of warnings is returned. This method is called during application installation.
        Parameters:
        policyData - The contents of was.policy file from ear
        preferences - The preferences object containing locale information.
        workspaceID - The workspace ID
        Returns:
        a Vector of custom policies for application
        Throws:
        AdminException - Throws AdminException if operation fails.
      • installStandaloneRAR

        void installStandaloneRAR(java.lang.String rarPath,
                                java.util.Hashtable props,
                                java.lang.String workspaceID)
                                  throws AdminException
        Deprecated. Use ConfigService instead. Installs a standalone RAR file. This method creates a J2CResourceAdapter in the resources.xml file in the scope specified by the properties. The user has to manually extract the RAR file at the destination location.
        Parameters:
        rarPath - Fully qualified RAR file name
        props - A properties hashtable that specifies more information about RAR install. The only required parameter is the scope which can be specified by the key AppConstants.APPDEPL_SERVER, or AppConstants.APPDEPL_NODE or AppConstants.APPDEPL_CELL. The resources.xml file from this specified scope is used to store the J2CResourceAdapter created by this method. Additionally the properties table can also specify name (key: AppConstants.RARDEPL_NAME), description (key: AppConstants.RARDEPL_DESCRIPTION), archivePath (key: AppConstants.RARDEPL_ARCHIVEPATH), and locale (key: APPDEPL_LOCALE).
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • checkIfAppExists

        boolean checkIfAppExists(java.lang.String appName,
                               java.util.Hashtable prefs,
                               java.lang.String workspaceID)
                                 throws AdminException
        Checks if an application with the given name is installed in the configuration.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Returns:
        true if the app is installed, false otherwise.
        Throws:
        AdminException - Throws AdminException if operation fails.
      • removeAllAppsFromNode

        void removeAllAppsFromNode(java.lang.String nodeName,
                                 java.lang.String cellName,
                                 java.util.Hashtable prefs,
                                 java.lang.String workspaceID)
                                   throws AdminException
        Removes all the applications from all the servers of a given node. The applications are not uninstalled. Only the server targets are removed. The modules can be then moved to servers on other nodes.
        Parameters:
        nodeName - The node name
        cellName - The cell name of the node.
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • removeAllAppsFromServer

        void removeAllAppsFromServer(javax.management.ObjectName objectName,
                                   java.util.Hashtable prefs,
                                   java.lang.String workspaceID)
                                     throws AdminException
        Callback for admin clients when a server is removed. The serverindex document is updated by removing deployment entries for that server and all the deployments are updated by removing any references to the server to be removed.
        Parameters:
        objectName - The javax.management.ObjectName for the server. This objectName should contains cell, node, server name. e.g. Websphere:cell=cellName,node=nodeName,server=serverName
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • removeAllAppsFromCluster

        void removeAllAppsFromCluster(javax.management.ObjectName objectName,
                                    java.util.Hashtable prefs,
                                    java.lang.String workspaceID)
                                      throws AdminException
        Callback for admin clients when a cluster is removed. The serverindex documents are updated by removing deployment entries for all members and all the deployments are updated by removing any references to the cluster or its members.
        Parameters:
        objectName - The javax.management.ObjectName for the cluster. This objectName should contains cell, cluster name. e.g. Websphere:cell=cellName,cluster=clusterName
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • changeServerToCluster

        void changeServerToCluster(javax.management.ObjectName serverName,
                                 javax.management.ObjectName clusterName,
                                 java.util.Hashtable prefs,
                                 java.lang.String workspaceID)
                                   throws AdminException
        Callback for admin clients when a server is turned into a cluster. This method is called after a server is changed into a cluster.
        Parameters:
        serverName - The javax.management.ObjectName for the server. This is of the form Websphere:cell=cellName,node=nodeName,server=serverName
        clusterName - The javax.management.ObjectName for the cluster. This is of the form Websphere:cell=cellName,cluster=clusterName
        prefs - The preferences object containing locale information.
        workspaceID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • clusterMemberAdded

        void clusterMemberAdded(javax.management.ObjectName memberName,
                              javax.management.ObjectName clusterName,
                              java.util.Hashtable prefs,
                              java.lang.String wID)
                                throws AdminException
        Callback for admin clients when a cluster member is added. If this is the first member then all the deployments are searched and server index entries for this member are updated. If there are other members in the cluster then deployment entries from their server index documents are copied for the new member.
        Parameters:
        memberName - The javax.management.ObjectName for the server. This is of the form Websphere:cell=cellName,node=nodeName,server=memberName
        clusterName - The javax.management.ObjectName for the cluster. This is of the form Websphere:cell=cellName,cluster=clusterName
        prefs - The preferences object containing locale information.
        wID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • updateAccessIDs

        void updateAccessIDs(java.lang.String appName,
                           java.lang.Boolean bAll,
                           java.util.Hashtable prefs,
                           java.lang.String wID)
                             throws AdminException
        Populates the application bindings of the deployment with the access IDs for all the users and groups. This method only works in JMX mode. It is used to boost performance by caching access IDs in the application metadata. This saves a call to user registry at runtime. This method should be called after application installation or after editing user registry.
        Parameters:
        appName - The application name
        bAll - true means accessIDs are obtained from the registry even if they exist in bindings. false means only the empty entries from bindings are populated.
        prefs - The preferences object containing locale information.
        wID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • deleteUserAndGroupEntries

        void deleteUserAndGroupEntries(java.lang.String appName,
                                     java.util.Hashtable prefs,
                                     java.lang.String wID)
                                       throws AdminException
        Deletes all the security binding information related to users and groups from application metadata.
        Parameters:
        appName - The application name
        prefs - The preferences object containing locale information.
        wID - The workspace ID
        Throws:
        AdminException - Throws AdminException if operation fails.
      • updateApplication

        void updateApplication(java.lang.String appName,
                             java.lang.String contentURI,
                             java.lang.String pathToContents,
                             java.lang.String operation,
                             java.util.Hashtable properties,
                             java.lang.String sessionID)
                               throws AdminException
        Upatates an installed application using various update inputs such as a single file, module, partial application or a complete application. The API is executed asynchronously similar to install or uninstall operation. The result of the operation is delivered via JMX events.

        Parameters:
        appName - The application to be updated
        contentURI - URI of the file to be updated. This parameter is ignored when a partial or full application update is specified.
        pathToContents - Path on the file system (local to AppManagement MBean) for contents to be updated. If an application is installed using zero binary copy mod then this parameter should always point to the location of the source EAR file.
        operation - Can be one of:
        AppConstants.APPUPDATE_ADD - add new contents. Throws an exception if contents already exists.
        AppConstants.APPUPDATE_UPDATE - updates existing contents. Throws an exception if contents do not exist.
        AppConstants.APPUPDATE_ADDUPDATE - performs add or update based on the existence of contents.
        APPConstants.APPUPDATE_DELETE - deletes contents. This parameter does not apply to partial application input.
        properties - The app install properties table The properties table should also contain the type of contents e.g. file, app, modulefile or partialapp e.g. properties.put (AppConstants.APPUPDATE_CONTENTTYPE, AppConstants.APPUPDATE_CONTENTTYPE_FILE);
        Throws:
        AdminException - Throws AdminException if update fails.
      • updateApplicationLocal

        void updateApplicationLocal(java.lang.String appName,
                                  java.lang.String contentURI,
                                  java.lang.String pathToContents,
                                  java.lang.String operation,
                                  java.util.Hashtable properties,
                                  AppNotification.Listener notf,
                                  java.lang.String sessionID)
                                    throws AdminException
        Upatates an installed application using various update inputs such as a single file, module, partial application or a complete application. The API is executed asynchronously similar to install or uninstall operation. The result of the operation is delivered via JMX events.

        This is an asynchronous call. The caller should pass in a listener object to learn about progress of update. This method should only be invoked when AppManagement instance is created in local mode.
        Parameters:
        appName - The application to be updated
        contentURI - URI of the file to be updated. This parameter is ignored when a partial of full application update is required.
        pathToContents - Path on the file system (local to AppManagement MBean) for contents to be updated.
        operation - Can be one of:
        AppConstants.APPUPDATE_ADD - add new contents. Throws an exception if contents already exists.
        AppConstants.APPUPDATE_UPDATE - updates existing contents. Throws an exception if contents do not exist.
        AppConstants.APPUPDATE_ADDUPDATE - performs add or update based on the existence of contents.
        APPConstants.APPUPDATE_DELETE - deletes contents. This parameter does not apply to partial application input.
        properties - The app install properties table
        Throws:
        AdminException - Throws AdminException if update fails.
      • listURIs

        java.util.List listURIs(java.lang.String appName,
                              java.lang.String moduleURI,
                              java.util.Hashtable prefs,
                              java.lang.String sessionID)
                                throws AdminException
        Lists URIs in the EAR or one of its archives (module or non module archives). For EAR file the return value does not contain module URIs.
        Parameters:
        appName - The application name.
        moduleURI - Module URI. Null for EAR file. The module URI can be the URI of the module file (e.g. abc.jar) or it can be the unique module URI as used in installApplication or getModuleInfo APIs (e.g. abc.jar+META-INF/ejb-jar.xml).
        prefs - The preferences object containing locale information.
        sessionID - The session ID.
        Returns:
        The list of URIs relative to the EAR or module file
        Throws:
        AdminException - Throws exception if can not access EAR file.
      • getApplicationContents

        byte[] getApplicationContents(java.lang.String appName,
                                    java.lang.String uri,
                                    java.util.Hashtable prefs,
                                    java.lang.String sessionID)
                                      throws AdminException
        Returns a byte array for contents of a file within the application EAR. If the file is a metadata file (e.g deployment descriptor, IBM-bindings, extensions etc then "use binary config" flag is consulted to return appropriate contents.
        Parameters:
        appName - The appliaction name
        uri - The uri within the EAR file. For files within the module the uri should start with module uri e.g. foo.war/WEB-INF/web.xml
        prefs - The preferences table containing locale information
        sessionID - The session ID
        Returns:
        byte array of URI contents, null if URI does not exist
        Throws:
        AdminException - if application EAR can not be located
      • startApplication

        java.lang.String startApplication(java.lang.String appName,
                                        java.util.Hashtable prefs,
                                        java.lang.String wID)
                                          throws AdminException
        Throws:
        AdminException
      • startApplication

        java.lang.String startApplication(java.lang.String appName,
                                        java.lang.String target,
                                        java.util.Hashtable prefs,
                                        java.lang.String wID)
                                          throws AdminException
        Throws:
        AdminException
      • stopApplication

        java.lang.String stopApplication(java.lang.String appName,
                                       java.util.Hashtable prefs,
                                       java.lang.String wID)
                                         throws AdminException
        Throws:
        AdminException
      • stopApplication

        java.lang.String stopApplication(java.lang.String appName,
                                       java.lang.String target,
                                       java.util.Hashtable prefs,
                                       java.lang.String wID)
                                         throws AdminException
        Throws:
        AdminException
      • getGlobalSettings

        java.util.Hashtable getGlobalSettings()
      • sendJMXEvent

        void sendJMXEvent(java.lang.Object userData)
      • sendJMXEvent

        void sendJMXEvent(java.lang.String type,
                        java.lang.Object userData)
      • searchJNDIReferences

        java.util.Hashtable searchJNDIReferences(java.util.List sList,
                                               java.lang.String nodes,
                                               java.util.Hashtable prefs,
                                               java.lang.String wID)
                                                 throws AdminException
        Returns a hashtable that includes the information of the applications that has references to the specified JndiNames. Key is an application name. Data is a String that contains "task name : module name : [ jndiname ]"
        Parameters:
        sList - a list of the JndiNames
        nodes - a list of the scopes. The format is WebSphere:cell=cellname,node=nodename+WebSphere:cell=cellname,node=nodename...
        prefs - The preferences table containing locale information
        wID - The session ID
        Returns:
        Hashtable the list of applications using the jndi names referenced by the specified J2CResourceAdapters.
        Throws:
        AdminException
      • updateCluster

        void updateCluster(java.lang.String[] appNames,
                         java.lang.Integer timeout,
                         java.util.Hashtable props,
                         java.lang.String wsId)
                           throws AdminException
        Throws:
        AdminException
      • searchResources

        java.util.List searchResources(java.lang.String appName,
                                     java.util.Hashtable prefs,
                                     java.lang.String wID)
                                       throws AdminException
        Throws:
        AdminException
      • convertRefToConfigID

        java.util.List convertRefToConfigID(java.lang.String appName,
                                          java.util.List resources,
                                          java.util.Hashtable prefs,
                                          java.lang.String wID)
                                            throws AdminException
        Returns a list that contains information of the resources referenced in the specified application. This list will be used as a input of convertRefToConfigID() MBean
        Parameters:
        appName - The application name
        prefs - The preferences table containing locale information
        wID - The session ID
        Returns:
        List of the resources referenced by the specified application.
        Throws:
        AdminException
      • getDistributionStatus

        void getDistributionStatus(java.lang.String appName,
                                 java.util.Hashtable prefs,
                                 java.lang.String wID)
                                   throws AdminException
        Returns the status of application distribution on each node that the app is supposed to run on. For distribution to be complete to a node the application files must have been synchronized with the node and the application EAR must have been expanded to the install destination on the node. This is an asynchronous operation. The result of the operation is sent via JMX event. The distribution status can be true, false or unknown (when the node is unreachable). The expansion flag gives the current status of expansion. It can be inprogress, notprocessing, error or unknown. An event is sent when each node is checked for distribution status. An AppNotification object sent as user data for the JMX event contains status for the node and overall status collected so far. The status for a given node is given by string WebSphere:cell=c,node=n,distribution=value,expansion=status where value = true, false or unknown. where status = inprogress, notprocessing, error or unknown. Overall distribution status is concatenation of distribution status of each node delimited by "+" This API can be used as a polling API after an application is installed to understand when the application has been distributed so that it can be started. Here is a sample code snippet to use -
        Parameters:
        appName - The application name
        prefs - Options table that can contain locale information
        wID - The session ID are delimited by "+" e.g. WebSphere:cell=c,node=n,distribution=true,expansion=notprocessing.
        Throws:
        AdminException
      • getEditionInfo

        EditionInfo[] getEditionInfo(java.lang.String appName,
                                   java.lang.String edition,
                                   java.util.Hashtable prefs,
                                   java.lang.String wID)
                                     throws AdminException
        Gets edition information for the application edition(s).

        This method only applies to environments where WebSphere Virtual Enterprise (VE) is enabled.

        The AppManagement MBean interface does not support this method. As an alternative, use the AdminTask command, getEditionState, supported when VE is enabled.

        Parameters:
        appName - The application name. The name can be a composite name (e.g., MyApp-edition2.0), in which case, the edition specification is ignored.
        edition - The edition(s) to return data for. An empty string ("") denotes the default edition, and an asterisk (*) denotes all editions.
        prefs - A hash table of preferences. It can contain a locale specification.
        wID - The workspace ID for the current session.
        Returns:
        The array of EditionInfo objects. Each element corresponds to an edition.
        Throws:
        AdminException
      • setEditionInfo

        void setEditionInfo(EditionInfo[] info,
                          java.util.Hashtable prefs,
                          java.lang.String wID)
                            throws AdminException
        Sets edition information for the application. Specifically, the application is updated with the edition description and state contained in the EditionInfo object that corresponds to the application.

        This method only applies to environments where WebSphere Virtual Enterprise (VE) is enabled.

        The AppManagement MBean interface does not support this method.

        Parameters:
        info - An array of EditionInfo objects. Each element corresponds to an application.
        prefs - A hash table of preferences. It can contain a locale specification.
        wID - The workspace ID for the current session.
        Throws:
        AdminException
      • getAppAssociation

        java.lang.String[] getAppAssociation(java.lang.String scope,
                                           java.lang.String retVal,
                                           java.util.Hashtable prefs,
                                           java.lang.String wID)
                                             throws AdminException
        Gets association between application and targets. This method allows you to list servers/nodes/cells for an app or list apps for a server/node/cell.
        Parameters:
        scope - Can be one of the following - application name, server name (WebSphere:cell=c,node=n,server=s), node name (WebSphere:cell=c,node=n), cell name (WebSphere:cell=c)
        retVal - The type of the return value. It can be one of the following AppConstants.APPDEPL_SERVER, AppConstants.APPDEPL_NODE, AppConstants.APPDEPL_CELL.
        prefs - The hashtable of prefernces
        wID - The workspace ID
        Returns:
        The list of values as specified by the type in retVal
        Throws:
        AdminException
      • listApplications

        java.util.Vector listApplications(java.lang.String targetScope,
                                        java.util.Hashtable props,
                                        java.lang.String sessionID)
                                          throws AdminException
        Lists applications on a given target.
        Parameters:
        targetScope - The target scope. For example, WebSphere:cell=myCell,node=myNode or WebSphere:cell=myCell,node=myNode,server=myServer or WebSphere:cell=myCell,cluster=myCluster
        props - Preferences
        sessionID - The session ID
        Returns:
        Vector of application names on the target scope *
        Throws:
        AdminException
      • listSystemApplications

        java.util.Vector listSystemApplications(java.util.Hashtable prefs,
                                              java.lang.String workspaceID)
                                                throws AdminException
        Lists system applications.
        Parameters:
        prefs - The hashtable of preferences.
        sessionID - The session ID
        Returns:
        Vector of system application names
        Throws:
        AdminException
      • renameApplication

        void renameApplication(java.lang.String appName,
                             java.lang.String newAppName,
                             java.util.Hashtable prefs,
                             java.lang.String workspaceID)
                               throws AdminException
        Renames an application.
        Parameters:
        appName - Existing application name. The name can be in the form of a composite name (ie: <APPNAME>-edition<EDITION>) when in a Virtual Enterprise (VE) environment.
        newAppName - New application name. The name can be in the form of a composite name (ie: <APPNAME>-edition<EDITION>) when in a Virtual Enterprise (VE) environment.
        prefs - the hashtable of preferences
        workspaceID - the workspace ID
        Throws:
        AdminException
      • renameApplicationLocal

        void renameApplicationLocal(java.lang.String appName,
                                  java.lang.String newAppName,
                                  java.util.Hashtable prefs,
                                  AppNotification.Listener notf,
                                  java.lang.String workspaceID)
                                    throws AdminException
        Renames an application.
        Parameters:
        appName - Existing application name. The name can be in the form of a composite name (ie: <APPNAME>-edition<EDITION>) when in a Virtual Enterprise (VE) environment.
        newAppName - New application name. The name can be in the form of a composite name (ie: <APPNAME>-edition<EDITION>) when in a Virtual Enterprise (VE) environment.
        prefs - the hashtable of preferences
        notf - a local event listener that the AppManagement logic notifies of rename progress
        workspaceID - the workspace ID
        Throws:
        AdminException
IBM WebSphere Application ServerTM
Release 8.5