com.ibm.websphere.management.application
Class AppManagementProxy
- java.lang.Object
-
- com.ibm.websphere.management.application.AppManagementProxy
-
- All Implemented Interfaces:
- AppManagement
public class AppManagementProxy extends java.lang.Object implements AppManagement
AppManagementProxy provides a common implementation for AppManagement interface in local and JMX mode. This class provides static APIs to get AppManagementProxy instance for
1) AppManagement in local mode (which runs in the absence of WebSphere application server
2) AppManagement MBean running in a server to be connected from a remote client
3) AppManagement MBean running in a server to be connected from an in-process client
-
-
Method Summary
Methods Modifier and Type Method and Description void
changeServerToCluster(javax.management.ObjectName arg0, javax.management.ObjectName arg1, java.util.Hashtable arg2, java.lang.String arg3)
Callback for admin clients when a server is turned into a cluster.boolean
checkIfAppExists(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2)
Checks if an application with the given name is installed in the configuration.void
clusterMemberAdded(javax.management.ObjectName arg0, javax.management.ObjectName arg1, java.util.Hashtable arg2, java.lang.String arg3)
Callback for admin clients when a cluster member is added.java.util.Vector
compareSecurityPolicy(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2)
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 arg0, java.lang.String arg1, java.util.Hashtable arg2, java.lang.String arg3)
Exports the application to a given file.void
extractDDL(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.util.Hashtable arg3, java.lang.String arg4)
Exports Table.ddl from all the jars in the earjava.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 wID)
Returns a byte array for contents of a file within the application EAR.java.util.Vector
getApplicationInfo(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2)
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()
static AppManagement
getJMXProxyForClient(AdminClient adminClient)
Returns a proxy for AppManagement functions to be called in JMX mode.static AppManagement
getJMXProxyForServer()
Returns a proxy for AppManagement functions to be called in JMX mode.static AppManagement
getLocalProxy()
Returns proxy for local mode AppManagement functions.java.util.Vector
getModuleInfo(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.lang.String arg3)
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 arg0, java.lang.String arg1, java.util.Hashtable arg2, AppNotification.Listener arg3)
Installs a J2EE application with the given name in WebSphere cell.void
installApplicationLocal(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, AppNotification.Listener arg3, java.lang.String arg4)
Installs a J2EE application with the given name in WebSphere cell.void
installStandaloneRAR(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2)
Deprecated.java.util.Vector
listApplications(java.util.Hashtable arg0, java.lang.String arg1)
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 arg0, java.util.Hashtable arg1, java.lang.String arg2)
Lists modules of an application.java.util.Vector
listSystemApplications(java.util.Hashtable prefs, java.lang.String sessionID)
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 arg0, java.util.Hashtable arg1, java.lang.String arg2, javax.management.ObjectName arg3, java.lang.String arg4)
Deprecated.void
publishWSDL(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, java.lang.String arg3)
Publish wsdl files to a zip filevoid
redeployApplication(java.lang.String localEarPath, java.lang.String arg1, java.util.Hashtable properties, java.lang.String arg3)
Updates an installed J2EE application with a new version of its binaries.void
redeployApplicationLocal(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, AppNotification.Listener arg3, java.lang.String arg4)
Updates an installed J2EE application with a new version of its binaries.void
removeAllAppsFromCluster(javax.management.ObjectName arg0, java.util.Hashtable arg1, java.lang.String arg2)
Callback for admin clients when a cluster is removed.void
removeAllAppsFromNode(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, java.lang.String arg3)
Removes all the applications from all the servers of a given node.void
removeAllAppsFromServer(javax.management.ObjectName arg0, java.util.Hashtable arg1, java.lang.String arg2)
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 arg0)
void
sendJMXEvent(java.lang.String s, java.lang.Object arg0)
void
setApplicationInfo(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.util.Vector arg3)
Sets the new binding information for an installed application.void
setApplicationInfoLocal(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.util.Vector arg3, AppNotification.Listener arg4)
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 arg0, java.util.Hashtable arg1, java.lang.String arg2, java.lang.String arg3, java.util.Vector arg4)
Sets the new binding information for an installed application module.void
setModuleInfoLocal(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.lang.String arg3, java.util.Vector arg4, AppNotification.Listener arg5)
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 arg0, java.util.Hashtable arg1, java.lang.String arg2)
Uninstalls an application from WebSphere cell.void
uninstallApplicationLocal(java.lang.String arg0, java.util.Hashtable arg1, AppNotification.Listener arg2)
Uninstalls an application from WebSphere cell.void
uninstallApplicationLocal(java.lang.String arg0, java.util.Hashtable arg1, AppNotification.Listener arg2, java.lang.String arg3)
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[] arg0, java.lang.Integer arg1, java.util.Hashtable arg2, java.lang.String arg3)
void
updateClusterLocal(java.lang.String[] arg0, java.lang.Integer arg1, java.util.Hashtable arg2, java.lang.String arg3, AppNotification.Listener arg4)
-
-
-
Method Detail
-
getLocalProxy
public static AppManagement getLocalProxy() throws java.lang.Exception
Returns proxy for local mode AppManagement functions. This proxy does not talk to WebSphere server. This proxy should not be used when WebSphere server is running on the same machine.- Returns:
- The AppManagement proxy instance
- Throws:
java.lang.Exception
-
getJMXProxyForClient
public static AppManagement getJMXProxyForClient(AdminClient adminClient) throws java.lang.Exception
Returns a proxy for AppManagement functions to be called in JMX mode. This proxy delegates to AppManagement MBean using AdminClient. This proxy should be used by clients that reside outside of server process.- Parameters:
adminClient
- The AdminClient instance to communicate with the server process- Returns:
- The AppManagement proxy instance
- Throws:
java.lang.Exception
-
getJMXProxyForServer
public static AppManagement getJMXProxyForServer() throws java.lang.Exception
Returns a proxy for AppManagement functions to be called in JMX mode. This proxy delegates to in-process AppManagement MBean. This proxy should be used by clients that reside in the same process as WebSphere server.- Returns:
- The AppManagement proxy instance
- Throws:
java.lang.Exception
-
sendJMXEvent
public void sendJMXEvent(java.lang.Object arg0)
- Specified by:
sendJMXEvent
in interfaceAppManagement
-
sendJMXEvent
public void sendJMXEvent(java.lang.String s, java.lang.Object arg0)
- Specified by:
sendJMXEvent
in interfaceAppManagement
-
getGlobalSettings
public java.util.Hashtable getGlobalSettings()
- Specified by:
getGlobalSettings
in interfaceAppManagement
-
clusterMemberAdded
public void clusterMemberAdded(javax.management.ObjectName arg0, javax.management.ObjectName arg1, java.util.Hashtable arg2, java.lang.String arg3) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
clusterMemberAdded
in interfaceAppManagement
- Parameters:
arg0
- The javax.management.ObjectName for the server. This is of the form Websphere:cell=cellName,node=nodeName,server=memberNamearg1
- The javax.management.ObjectName for the cluster. This is of the form Websphere:cell=cellName,cluster=clusterNamearg2
- The preferences object containing locale information.arg3
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
changeServerToCluster
public void changeServerToCluster(javax.management.ObjectName arg0, javax.management.ObjectName arg1, java.util.Hashtable arg2, java.lang.String arg3) throws AdminException
Description copied from interface:AppManagement
Callback for admin clients when a server is turned into a cluster. This method is called after a server is changed into a cluster.- Specified by:
changeServerToCluster
in interfaceAppManagement
- Parameters:
arg0
- The javax.management.ObjectName for the server. This is of the form Websphere:cell=cellName,node=nodeName,server=serverNamearg1
- The javax.management.ObjectName for the cluster. This is of the form Websphere:cell=cellName,cluster=clusterNamearg2
- The preferences object containing locale information.arg3
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
removeAllAppsFromCluster
public void removeAllAppsFromCluster(javax.management.ObjectName arg0, java.util.Hashtable arg1, java.lang.String arg2) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
removeAllAppsFromCluster
in interfaceAppManagement
- Parameters:
arg0
- The javax.management.ObjectName for the cluster. This objectName should contains cell, cluster name. e.g. Websphere:cell=cellName,cluster=clusterNamearg1
- The preferences object containing locale information.arg2
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
removeAllAppsFromServer
public void removeAllAppsFromServer(javax.management.ObjectName arg0, java.util.Hashtable arg1, java.lang.String arg2) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
removeAllAppsFromServer
in interfaceAppManagement
- Parameters:
arg0
- The javax.management.ObjectName for the server. This objectName should contains cell, node, server name. e.g. Websphere:cell=cellName,node=nodeName,server=serverNamearg1
- The preferences object containing locale information.arg2
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
removeAllAppsFromNode
public void removeAllAppsFromNode(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, java.lang.String arg3) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
removeAllAppsFromNode
in interfaceAppManagement
- Parameters:
arg0
- The node namearg1
- The cell name of the node.arg2
- The preferences object containing locale information.arg3
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
checkIfAppExists
public boolean checkIfAppExists(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2) throws AdminException
Description copied from interface:AppManagement
Checks if an application with the given name is installed in the configuration.- Specified by:
checkIfAppExists
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The preferences object containing locale information.arg2
- The workspace ID- Returns:
- true if the app is installed, false otherwise.
- Throws:
AdminException
- Throws AdminException if operation fails.
-
installStandaloneRAR
public void installStandaloneRAR(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2) throws AdminException
Deprecated.- Specified by:
installStandaloneRAR
in interfaceAppManagement
- Parameters:
arg0
- Fully qualified RAR file namearg1
- 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).arg2
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
compareSecurityPolicy
public java.util.Vector compareSecurityPolicy(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
compareSecurityPolicy
in interfaceAppManagement
- Parameters:
arg0
- The contents of was.policy file from eararg1
- The preferences object containing locale information.arg2
- The workspace ID- Returns:
- a Vector of custom policies for application
- Throws:
AdminException
- Throws AdminException if operation fails.
-
listModules
public java.lang.Object listModules(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2) throws AdminException
Description copied from interface:AppManagement
Lists modules of an application.- Specified by:
listModules
in interfaceAppManagement
- Parameters:
arg0
- The application namearg2
- 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.
-
listApplications
public java.util.Vector listApplications(java.util.Hashtable arg0, java.lang.String arg1) throws AdminException
Description copied from interface:AppManagement
Lists installed applications.- Specified by:
listApplications
in interfaceAppManagement
- Parameters:
arg0
- The preferences object containing locale information.- Returns:
- An array of application names
- Throws:
AdminException
- Throws AdminException if operation fails.
-
extractDDL
public void extractDDL(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.util.Hashtable arg3, java.lang.String arg4) throws AdminException
Description copied from interface:AppManagement
Exports Table.ddl from all the jars in the ear- Specified by:
extractDDL
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The prefix for DDL filesarg2
- The destination dir namearg3
- The preferences object containing locale information.arg4
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
exportApplication
public void exportApplication(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, java.lang.String arg3) throws AdminException
Description copied from interface:AppManagement
Exports the application to a given file.- Specified by:
exportApplication
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The destination file namearg2
- The preferences object containing locale information.arg3
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
moveModule
public void moveModule(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, javax.management.ObjectName arg3, java.lang.String arg4) throws AdminException
Deprecated.- Specified by:
moveModule
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The preferences object containing locale information.arg2
- The unique module URI string.arg3
- The JMX object name of destination.arg4
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
setModuleInfo
public void setModuleInfo(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.lang.String arg3, java.util.Vector arg4) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
setModuleInfo
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The preferences object containing locale information.arg2
- The unique module URI string.arg3
- The workspace IDarg4
- The vector of tasks- Throws:
AdminException
- Throws AdminException if operation fails.
-
setModuleInfoLocal
public void setModuleInfoLocal(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.lang.String arg3, java.util.Vector arg4, AppNotification.Listener arg5) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
setModuleInfoLocal
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The preferences object containing locale information.arg2
- The unique module URI string.arg3
- The workspace IDarg4
- The vector of tasksarg5
- A local event listener that the AppManagement logic notifies of edit progress.- Throws:
AdminException
- Throws AdminException if operation fails.
-
setApplicationInfo
public void setApplicationInfo(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.util.Vector arg3) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
setApplicationInfo
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The preferences object containing locale information.arg2
- The workspace IDarg3
- The vector of tasks- Throws:
AdminException
- Throws AdminException if operation fails.
-
setApplicationInfoLocal
public void setApplicationInfoLocal(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.util.Vector arg3, AppNotification.Listener arg4) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
setApplicationInfoLocal
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The preferences object containing locale information.arg2
- The workspace IDarg3
- The vector of tasksarg4
- A local event listener that the AppManagement logic notifies of edit progress.- Throws:
AdminException
- Throws AdminException if operation fails.
-
getModuleInfo
public java.util.Vector getModuleInfo(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2, java.lang.String arg3) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
getModuleInfo
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The preferences object containing locale information.arg2
- The unique module URI string.arg3
- The workspace ID- Returns:
- The module-specific tasks
- Throws:
AdminException
- Throws AdminException if operation fails.
-
getApplicationInfo
public java.util.Vector getApplicationInfo(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
getApplicationInfo
in interfaceAppManagement
- Parameters:
arg0
- The application namearg1
- The preferences object containing locale information.arg2
- The workspace ID- Returns:
- The application tasks
- Throws:
AdminException
- Throws AdminException if operation fails.
-
redeployApplication
public void redeployApplication(java.lang.String localEarPath, java.lang.String arg1, java.util.Hashtable properties, java.lang.String arg3) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
redeployApplication
in interfaceAppManagement
- Parameters:
localEarPath
- Fully qualified ear file namearg1
- The application nameproperties
- The app install properties tablearg3
- The workspaceID- Throws:
AdminException
- Throws AdminException if redeployment fails.
-
redeployApplicationLocal
public void redeployApplicationLocal(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, AppNotification.Listener arg3, java.lang.String arg4) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
redeployApplicationLocal
in interfaceAppManagement
- Parameters:
arg0
- Fully qualified ear file namearg1
- The application namearg2
- The app install properties tablearg3
- A local event listener that the AppManagement logic notifies of update progress.arg4
- The workspaceID- Throws:
AdminException
- Throws AdminException if redeployment fails.
-
uninstallApplication
public void uninstallApplication(java.lang.String arg0, java.util.Hashtable arg1, java.lang.String arg2) throws AdminException
Description copied from interface:AppManagement
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);
- Specified by:
uninstallApplication
in interfaceAppManagement
- Parameters:
arg0
- The name of installed applicationarg1
- A properties table to specify additional preferences for uninstallation. The table can contain properties locale and handback object.arg2
- The workspace ID- Throws:
AdminException
- Throws AdminException if uninstall fails.
-
uninstallApplicationLocal
public void uninstallApplicationLocal(java.lang.String arg0, java.util.Hashtable arg1, AppNotification.Listener arg2, java.lang.String arg3) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
uninstallApplicationLocal
in interfaceAppManagement
- Parameters:
arg0
- The name of installed applicationarg1
- A properties table to specify additional preferences for uninstallation. The table can contain properties locale and handback object.arg2
- A local event listener that the AppManagement logic notifies of uninstallation progress.arg3
- The workspace ID- Throws:
AdminException
- Throws AdminException if uninstall fails.
-
uninstallApplicationLocal
public void uninstallApplicationLocal(java.lang.String arg0, java.util.Hashtable arg1, AppNotification.Listener arg2) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
uninstallApplicationLocal
in interfaceAppManagement
- Parameters:
arg0
- The name of installed applicationarg1
- A properties table to specify additional preferences for uninstallation. The table can contain properties locale and handback object.arg2
- A local event listener that the AppManagement logic notifies of uninstallation progress.- Throws:
AdminException
- Throws AdminException if uninstall fails.
-
installApplicationLocal
public void installApplicationLocal(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, AppNotification.Listener arg3, java.lang.String arg4) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
installApplicationLocal
in interfaceAppManagement
- Parameters:
arg0
- Fully qualified name of local ear filearg1
- The application namearg2
- The app install properties tablearg3
- A local event listener that the AppManagement logic notifies of installation progress.arg4
- The workspace ID.- Throws:
AdminException
- Throws AdminException if install fails.
-
installApplicationLocal
public void installApplicationLocal(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, AppNotification.Listener arg3) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
installApplicationLocal
in interfaceAppManagement
- Parameters:
arg0
- Fully qualified name of local ear file.arg1
- The application namearg2
- The app install properties tablearg3
- A local event listener that the AppManagement logic notifies of installation progress.- Throws:
AdminException
- Throws AdminException if install fails.
-
installApplication
public void installApplication(java.lang.String localEarPath, java.lang.String appName, java.util.Hashtable properties, java.lang.String workspaceID) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
installApplication
in interfaceAppManagement
- 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 tableworkspaceID
- The workspace ID.- Throws:
AdminException
- Throws AdminException if install fails.
-
installApplication
public void installApplication(java.lang.String localEarPath, java.util.Hashtable properties, java.lang.String workspaceID) throws AdminException
Description copied from interface:AppManagement
Installs a J2EE application 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. This API takes an EAR file and a properties table that defines various options passed in for installation. The properties table contains all the information that is needed during installation but not stored in the EAR file. The following table lists possible options that can be passed in.
Note1: All the keys in this table are defined as constants in com.ibm.websphere.management.application.AppConstants class. Always use these constants instead of their values.
Note2: uniqueModuleURI - In the following table there are references to uniqueModuleURI. This is a string that specifies module URI and deployment descriptor (DD) URI for that module. The module URI is specified relative to the EAR root while the DD URI for default deployment descriptor is specified relative to the module. This forms a unique combination to locate a module in the EAR file. The string is formed by concatenating module URI, "+" and DD URI. For example, a module with URI beenthere.jar and using default EJB DD has uniqueModuleURI as "beenthere.jar+META-INF/ejb-jar.xml". For modules with Alt-DD the DD URI is relative to the root of the EAR.
Key Value Description AppConstants.APPDEPL_LOCALE java.util.Locale Optional. Used by server install code to generate messages. Default - default locale AppConstants.APPDEPL_DISTRIBUTE_APP java.lang.Boolean Optional. Default - TRUE. Specifies if EAR file is expanded to (or deleted from) the install destination directory upon installation (or uninstallation). The application EAR is expanded by default to the install destination directory of each node where the application is expected to run. If this option is set to FALSE, it is user's responsibility to make sure that the application EAR is expanded at the install location on each node before application is started. AppConstants.APPDEPL_USE_BINARY_CONFIG java.lang.Boolean Optional. Default - FALSE. Specifies if the runtime should read application metadata (dd / bindings/ extensions) from ear file. By default the metadata is read from config/cells/cellName/applications/appName.ear/deployments/appName directory in the repository. AppConstants.APPDEPL_DEPLOYEJB_CMDARG java.lang.Boolean Optional. Default - FALSE Specifies if EJBDeploy tool should be invoked on the EAR during installation. The installation may take up to several minutes if this option is set to TRUE. AppConstants.APPDEPL_DEPLOYEJB_OPTIONS java.util.Hashtable Required if AppConstants.APPDEPL_DEPLOYEJB_CMDARG is set to TRUE. The entires in this hashtable are as follows AppConstants.APPDEPL_INSTALL_DIR java.lang.String Optional. Speficies the directory to which the application EAR file will be installed. The default value is ${APP_INSTALL_ROOT}/cell_name/appname.ear, where the APP_INSTALL_ROOT variable expands to install_root/installedApps; for example, C:\WebSphere\AppServer\installedApps\cell_name. You can specify an absolute path or use a pathmap variable such as ${MY_APPS}. You can use a pathmap variable in any installation though it is particularly needed when installing an application on a cluster with members on heterogeneous nodes because, in such cases, there might not be a single way to specify an absolute path. A WebSphere Application Server variable ${CELL} that denotes the current cell name can also be in the pathmap variable; for example, ${MY_APP}/${CELL}. AppConstants.APPDEPL_MBEANFORRES java.lang.Boolean Optional. Default - TRUE. Specifies if MBeans are created for all the servlets, jsps and EJBs in the application. Turning this off may reduce memory usage and application startup time. AppConstants.APPDEPL_RELOAD_ENABLED java.lang.Boolean Optional. Default - Not saved if not specified. Specifies whether the application's filesystem will be scanned for updated files, so that changes are dynamically reloaded. If not specified then the value is taken from the IBM extensions in the EAR file. AppConstants.APPDEPL_RELOAD_INTERVAL java.lang.String Optional. Default - Not saved if not specified. The timeperiod (in seconds) in which the application's filesystem will be scanned for updated files. This setting takes effect only if class reloading is enabled. If not specified then the value is taken from the IBM extension in the EAR file. AppConstants.APPDEPL_APP_NAME java.lang.String Optional. Specifies the application name. If not specified, then application name is taken from the deployment descriptor of the application. If not specified in the deployment descriptor then the name of the EAR is used as application name. AppConstants.APPDEPL_PRECOMPILE_JSP java.lang.Boolean Optional. Default - FALSE Specifies whether to precompile jsps in all the Web modules. jsps are precompiled during installation if this attribute is set to TRUE. AppConstants.APPDEPL_MODULE_TO_SERVER java.util.Hashtable Required. This table contains module - server relationships. All the EJB, Web, RAR modules that are to be deployed on specific targets should be listed in this table. The keys of this table are uniqueModuleURI strings. The values are Strings of the format "WebSphere:cell=cellName,node=nodeName, server=serverName" for server targets and "WebSphere:cell=cellName, cluster=clusterName" for cluster targets. Multiple targets can be specified by using "+" as a delimiter. An example entry in the table looks like -
Key = "abc.war+WEB-INF/web.xml"
Value = "WebSphere:cell=myNetwork,node=mynode,server=server1+ WebSphere:cell=myNetwork,cluster=MyCluster"AppConstants.APPDEPL_DELETE_SRC_EAR java.lang.Boolean Optional. Default - FALSE Specifies whether to delete the ear file passed in as a parameter after installation. AppConstants.APPDEPL_HANDBACK java.io.Serializable Optional. Default - N/A Specifies a serializable object that is passed back to the caller with notifications generated during installation. This handback object is useful when a single listener listens to JMX events from multiple concurrent installations. AppConstants.APPDEPL_ZERO_BINARY_COPY java.lang.Boolean Optional. Default - FALSE When this option is specified, the install logic does not copy EAR file or application metadata in the repository. Only the deployment information is stored in the repository. Specifying this flag also means AppConstants.APPDEPL_DISTRIBUTE_APP=False and AppConstants.APPDEPL_USE_BINARY_CONFIG=True. In other words, values of APPDEPL_DISTRIBUTE_APP and APPDEPL_USE_BINARY_CONFIG are ignored. When an application is installed using this option all subsequent operations on the application such as edit, export, extractDDL (except uninstall) fail with an exception. An application installed using this option is not uploaded to the ND configuration during addNode even if -includeApps option is specified. AppConstants.APPDEPL_ARCHIVE_UPLOAD java.lang.Boolean Optional. Default - FALSE Uploads the archive to the WebSphere server machine before deploying it. This option ONLY works when the AppManagement function is called using AppManagementProxy class and the proxy class is created using getJMXProxyForClient method. This option thus allows a deployer to deploy the archive remotely. The archive uploaded to WebSphere server machine is deleted after the operation is completed.
AppConstants.APPDEPL_DEPLOYEJB_OPTIONS
Key Value AppConstants.APPDEPL_DEPLOYEJB_DBTYPE_OPTION java.lang.String - db type (Optional) AppConstants.APPDEPL_DEPLOYEJB_DBNAME_OPTION java.lang.String - db name (Optional) AppConstants.APPDEPL_DEPLOYEJB_DBSCHEMA_OPTION java.lang.String - db schema name (Optional) AppConstants.APPDEPL_DEPLOYEJB_CLASSPATH_OPTION java.lang.String - extract classpath (Optional) AppConstants.APPDEPL_DEPLOYEJB_RMIC_OPTION java.lang.String - extra rmic options (Optional) AppConstants.APPDEPL_DEPLOYEJB_VALIDATE_OPTION java.lang.Boolean - run validation during EJBDeploy (Optional)
Sample code to install an application from a remote client:-
// Assume an ear /tmp/xyz.ear which has 2 module testEJB.jar and testWEB.war. // The configuration has a server server1 and a cluster cluster1. // create AppManagement proxy to AppManagement MBean using AdminClient AppManagement appM = AppManagementProxy.getJMXProxyForClient (adminClient); // create event filter NotificationFilterSupport myFilter = new NotificationFilterSupport(); myFilter.enableType (AppConstants.NotificationType); //get AppManagement MBean's ObjectName ObjectName on = // get MBean (type=AppManagement) // add listener //assumes - listenerImpl which is implementation of javax.management.NotificationListener adminClient.addNotificationListener (on, listenerImpl, myFilter, null); // prepare properties table Hashtable props = new Hashtable(); props.put (AppConstants.APPDEPL_LOCALE, Locale.getDefault()); // create module to server relations table Hashtable module2server = new Hashtable(); module2server.put ("testEJB.jar+META-INF/ejb-jar.xml", "WebSphere:cell=cellName,node=nodeName,server=server1"); module2server.put ("testWEB.jar+WEB-INF/web.xml", "WebSphere:cell=cellName,cluster=cluster1"); props.put (AppConstants.APPDEPL_MODULE_TO_SERVER, module2server); // call install appM.installApplication ("/tmp/xyz.ear", "AppName", props, null); .... // listen to events public void handleNotification (Notification notf, Object handback) { AppNotification ev = (AppNotification) notf.getUserData(); if (ev.taskName.equals (AppNotification.INSTALL)) { if (ev.taskStatus.equals (AppNotification.STATUS_COMPLETED)) { // install succeeded .. remove listener } else if (ev.taskStatus.equals (AppNotification.STATUS_FAILED)) { // install failed .. remove listener } else { // install in progress } } }
- Specified by:
installApplication
in interfaceAppManagement
- Parameters:
localEarPath
- Fully qualified ear file name. The EAR file must be on the same machine where the MBean is running.properties
- The app install properties tableworkspaceID
- The workspace ID.- Throws:
AdminException
- Throws AdminException if install fails.
-
updateAccessIDs
public void updateAccessIDs(java.lang.String appName, java.lang.Boolean bAll, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
updateAccessIDs
in interfaceAppManagement
- Parameters:
appName
- The application namebAll
- 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
public void deleteUserAndGroupEntries(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
Deletes all the security binding information related to users and groups from application metadata.- Specified by:
deleteUserAndGroupEntries
in interfaceAppManagement
- Parameters:
appName
- The application nameprefs
- The preferences object containing locale information.wID
- The workspace ID- Throws:
AdminException
- Throws AdminException if operation fails.
-
startApplication
public java.lang.String startApplication(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
- Specified by:
startApplication
in interfaceAppManagement
- Throws:
AdminException
-
startApplication
public java.lang.String startApplication(java.lang.String appName, java.lang.String target, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
- Specified by:
startApplication
in interfaceAppManagement
- Throws:
AdminException
-
stopApplication
public java.lang.String stopApplication(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
- Specified by:
stopApplication
in interfaceAppManagement
- Throws:
AdminException
-
stopApplication
public java.lang.String stopApplication(java.lang.String appName, java.lang.String target, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
- Specified by:
stopApplication
in interfaceAppManagement
- Throws:
AdminException
-
publishWSDL
public void publishWSDL(java.lang.String arg0, java.lang.String arg1, java.util.Hashtable arg2, java.lang.String arg3) throws AdminException
Description copied from interface:AppManagement
Publish wsdl files to a zip file- Specified by:
publishWSDL
in interfaceAppManagement
- Parameters:
arg0
- the name of application for which publishWSDL will be executed.arg1
- the location where the wsdl file to be published. This path has to be valid before calling this method.arg2
- contains both Locale and a nested data structure (AttributeList) for port endpoint addresses {moduleName {transport address}+}*arg3
- the id to identify the current workspace- Throws:
AdminException
- Throws AdminException if operation fails.
-
searchJNDIReferences
public java.util.Hashtable searchJNDIReferences(java.util.List sList, java.lang.String nodes, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
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 ]"- Specified by:
searchJNDIReferences
in interfaceAppManagement
- Parameters:
sList
- a list of the JndiNamesnodes
- a list of the scopes. The format is WebSphere:cell=cellname,node=nodename+WebSphere:cell=cellname,node=nodename...prefs
- The preferences table containing locale informationwID
- The session ID- Returns:
- Hashtable the list of applications using the jndi names referenced by the specified J2CResourceAdapters.
- Throws:
AdminException
-
updateApplication
public 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
Description copied from interface:AppManagement
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.- Specified by:
updateApplication
in interfaceAppManagement
- Parameters:
appName
- The application to be updatedcontentURI
- 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
public 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
Description copied from interface:AppManagement
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.- Specified by:
updateApplicationLocal
in interfaceAppManagement
- Parameters:
appName
- The application to be updatedcontentURI
- 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
public java.util.List listURIs(java.lang.String appName, java.lang.String moduleURI, java.util.Hashtable prefs, java.lang.String sessionID) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
listURIs
in interfaceAppManagement
- 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.
-
updateCluster
public void updateCluster(java.lang.String[] arg0, java.lang.Integer arg1, java.util.Hashtable arg2, java.lang.String arg3) throws AdminException
- Specified by:
updateCluster
in interfaceAppManagement
- Throws:
AdminException
-
updateClusterLocal
public void updateClusterLocal(java.lang.String[] arg0, java.lang.Integer arg1, java.util.Hashtable arg2, java.lang.String arg3, AppNotification.Listener arg4) throws AdminException
- Specified by:
updateClusterLocal
in interfaceAppManagement
- Throws:
AdminException
-
searchResources
public java.util.List searchResources(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
- Specified by:
searchResources
in interfaceAppManagement
- Throws:
AdminException
-
convertRefToConfigID
public java.util.List convertRefToConfigID(java.lang.String appName, java.util.List resources, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
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- Specified by:
convertRefToConfigID
in interfaceAppManagement
- Parameters:
appName
- The application nameprefs
- The preferences table containing locale informationwID
- The session ID- Returns:
- List of the resources referenced by the specified application.
- Throws:
AdminException
-
getApplicationContents
public byte[] getApplicationContents(java.lang.String appName, java.lang.String uri, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
getApplicationContents
in interfaceAppManagement
- Parameters:
appName
- The appliaction nameuri
- 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.xmlprefs
- The preferences table containing locale informationwID
- The session ID- Returns:
- byte array of URI contents, null if URI does not exist
- Throws:
AdminException
- if application EAR can not be located
-
getDistributionStatus
public void getDistributionStatus(java.lang.String appName, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
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 -- Specified by:
getDistributionStatus
in interfaceAppManagement
- Parameters:
appName
- The application nameprefs
- Options table that can contain locale informationwID
- The session ID are delimited by "+" e.g. WebSphere:cell=c,node=n,distribution=true,expansion=notprocessing.- Throws:
AdminException
-
getAppAssociation
public java.lang.String[] getAppAssociation(java.lang.String scope, java.lang.String retVal, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
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.- Specified by:
getAppAssociation
in interfaceAppManagement
- 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 prefernceswID
- The workspace ID- Returns:
- The list of values as specified by the type in retVal
- Throws:
AdminException
-
getEditionInfo
public EditionInfo[] getEditionInfo(java.lang.String appName, java.lang.String edition, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
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.
- Specified by:
getEditionInfo
in interfaceAppManagement
- 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
public void setEditionInfo(EditionInfo[] info, java.util.Hashtable prefs, java.lang.String wID) throws AdminException
Description copied from interface:AppManagement
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.
- Specified by:
setEditionInfo
in interfaceAppManagement
- 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
-
listApplications
public java.util.Vector listApplications(java.lang.String targetScope, java.util.Hashtable props, java.lang.String sessionID) throws AdminException
Description copied from interface:AppManagement
Lists applications on a given target.- Specified by:
listApplications
in interfaceAppManagement
- 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=myClusterprops
- PreferencessessionID
- The session ID- Returns:
- Vector of application names on the target scope *
- Throws:
AdminException
-
listSystemApplications
public java.util.Vector listSystemApplications(java.util.Hashtable prefs, java.lang.String sessionID) throws AdminException
Description copied from interface:AppManagement
Lists system applications.- Specified by:
listSystemApplications
in interfaceAppManagement
- Parameters:
prefs
- The hashtable of preferences.- Returns:
- Vector of system application names
- Throws:
AdminException
-
renameApplication
public void renameApplication(java.lang.String appName, java.lang.String newAppName, java.util.Hashtable prefs, java.lang.String workspaceID) throws AdminException
Description copied from interface:AppManagement
Renames an application.- Specified by:
renameApplication
in interfaceAppManagement
- 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 preferencesworkspaceID
- the workspace ID- Throws:
AdminException
- See Also:
AppManagement.renameApplication(String, String, Hashtable, String)
-
renameApplicationLocal
public void renameApplicationLocal(java.lang.String appName, java.lang.String newAppName, java.util.Hashtable prefs, AppNotification.Listener notf, java.lang.String workspaceID) throws AdminException
Description copied from interface:AppManagement
Renames an application.- Specified by:
renameApplicationLocal
in interfaceAppManagement
- 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 preferencesnotf
- a local event listener that the AppManagement logic notifies of rename progressworkspaceID
- the workspace ID- Throws:
AdminException
- See Also:
AppManagement#renameApplicationLocal(String, String, Hashtable, Listener, String)
-
-