public class DeploymentService extends Facade implements DeploymentServiceMBean
CONFIG_SCHEMA_PATH, DOMAIN, MASKED_FIELD_VALUE, mComponentConfigSchema, mEnvCtx, mLog, mMBeanNames, mMBeanSvr, mMgtCtx, mMsgBuilder, mPlatform, mTarget, mTranslator, PASSWORD, SERVER, sTypeMap, WORKSPACE_ROOTSHUTDOWN, STARTED, STOPPED| Constructor and Description |
|---|
DeploymentService(EnvironmentContext ctx,
String target) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDeployToComponent(String componentName)
Returns
true if the the given component accepts the
deployment of service units. |
String |
deploy(String serviceAssemblyZipUrl)
Deploys the given Service Assembly to the JBI environment.
|
String |
deployFromRepository(String serviceAssemblyName)
Deploy a Service Assembly from the Repository.
|
String[] |
getComponentsForDeployedServiceAssembly(String serviceAssemblyName)
Returns an array of component names, where for each the given assembly
contains a service unit for the component.
|
String[] |
getDeployedServiceAssemblies()
Returns a list of Service Assemblies deployed to the JBI environment.
|
String[] |
getDeployedServiceAssembliesForComponent(String componentName)
Returns an array of Service Assembly names, each service assembly in the
returned list has a service unit deployed to the component
|
String[] |
getDeployedServiceUnitList(String componentName)
Returns an array of service unit names that are currently deployed to
the named component.
|
String |
getServiceAssemblyDescriptor(String serviceAssemblyName)
Returns the deployment descriptor of the Service Assembly that was
deployed to the JBI enviroment, serialized to a
String. |
String |
getServiceAssemblyName(String serviceUnitName,
String componentName)
Get the Service Assembly name for a specific service unit deployed to a
specific component.
|
String |
getServiceUnitDescriptor(String serviceAssemblyName,
String serviceUnitName)
Returns the deployment descriptor of the Service Unit that was
deployed to the JBI enviroment, serialized to a
String. |
String |
getServiceUnitState(String componentName,
String serviceUnitName)
Get the state of a service unit deployed to a component.
|
String |
getState(String serviceAssemblyName)
Get the running state of a service assembly.
|
boolean |
isDeployedServiceUnit(String componentName,
String serviceUnitName)
Queries if the named Service Unit is currently deployed to the named
component.
|
boolean |
isServiceAssemblyDeployedInInstance(String saName,
String instanceName)
This method is used to find out if a SA is deployed in the
given instance.
|
String |
shutDown(String serviceAssemblyName)
Shut down the service assembly.
|
String |
shutDown(String serviceAssemblyName,
boolean force)
Shut down the service assembly.
|
String |
start(String serviceAssemblyName)
Start the service assembly.
|
String |
stop(String serviceAssemblyName)
Stop the service assembly.
|
String |
undeploy(String serviceAssemblyName)
Undeploys the given Service Assembly from the JBI environment.
|
String |
undeploy(String serviceAssemblyName,
boolean force)
Undeploys the given Service Assembly from the target.
|
String |
undeploy(String serviceAssemblyName,
boolean force,
boolean keep)
Undeploys the given Service Assembly from the JBI environment.
|
archiveEqualityCheck, areAllInstancesUp, componentInstallationCheck, convertToString, fromFileURL, getAllTargets, getComponentConfigurationData, getComponentConfigurationNS, getComponentConfigurationSchema, getComponentLifeCycleMBeanName, getComponentQuery, getComponentQuery, getComponentState, getComponentStateOnInstance, getComponentType, getFacadeInstallerMBeanName, getFacadeInstallerMBeanName, getGenericQuery, getMBeanServerConnection, getRegistry, getRemoteAdminServiceObjectName, getRemoteAttribute, getRemoteAttributes, getServiceAssemblyQuery, getUpdater, handleClusteredInstanceFailures, initPrimitiveTypeMap, instanceRunningCheck, invokeLocalOperation, invokeRemoteOperation, invokeRemoteVoidOperation, isComponentInstalled, isInstanceRunning, isMBeanRegisteredOnInstance, isSharedLibraryInstalled, isTargetUp, mbeanRegistrationCheck, setRemoteAttribute, setRemoteAttributes, sharedLibraryInstallationCheck, throwNotSupportedManagementException, toFileURL, unregisterComponentConfigurationMBean, unregisterComponentConfigurationMBean, unregisterComponentExtensionMBean, unregisterComponentExtensionMBean, unregisterComponentLifeCycleMBean, unregisterComponentLifeCycleMBean, uploadFile, validateArchivepublic DeploymentService(EnvironmentContext ctx, String target) throws ManagementException
ManagementExceptionpublic String deploy(String serviceAssemblyZipUrl) throws Exception
Note that the implementation must not automatically start the service
assembly after deployment; it must wait for the start(String)
method to be invoked by the administrative tool.
For the domain target, deploy only validates the service assembly and then
adds it to the Registry / Repository.
deploy in interface DeploymentServiceMBeanserviceAssemblyZipUrl - String containing the location URL of the
Service Assembly ZIP file; must be non-null, non-empty, and a
legal URLException - if complete deployment failspublic String undeploy(String serviceAssemblyName) throws Exception
undeploy in interface DeploymentServiceMBeanserviceAssemblyName - name of the Service Assembly that is to be
undeployed; must be non-null and non-emptyException - if compelete undeployment failspublic String start(String serviceAssemblyName) throws Exception
DeploymentServiceMBean.STARTED state.start in interface DeploymentServiceMBeanserviceAssemblyName - name of the assembly to be started; must be
non-null and non-emptyException - if there is no such assemblyException - if the assembly fails to startpublic String stop(String serviceAssemblyName) throws Exception
DeploymentServiceMBean.STOPPED state.stop in interface DeploymentServiceMBeanserviceAssemblyName - name of the assembly to be stopped; must be
non-null and non-emptyException - if there is no such assemblyException - if the assembly fails to stoppublic String shutDown(String serviceAssemblyName) throws Exception
DeploymentServiceMBean.SHUTDOWN state.shutDown in interface DeploymentServiceMBeanserviceAssemblyName - name of the assembly to be shut down; must be
non-null and non-emptyException - if there is no such assemblyException - if the assembly fails to shut downpublic boolean canDeployToComponent(String componentName)
true if the the given component accepts the
deployment of service units. This is used by admin tools to
determine which components can be named in service assembly
deployment descriptors.canDeployToComponent in interface DeploymentServiceMBeancomponentName - name of the component; must be non-null and
non-emptytrue if the named component accepts deployments;
false if the named component does not accept
deployments or it does not existpublic String[] getDeployedServiceUnitList(String componentName) throws Exception
getDeployedServiceUnitList in interface DeploymentServiceMBeancomponentName - the name of the component to query; must be
non-null and non-emptyException - if a processing error occurspublic String[] getDeployedServiceAssemblies() throws Exception
getDeployedServiceAssemblies in interface DeploymentServiceMBeanException - if a processing error occurspublic String getServiceAssemblyDescriptor(String serviceAssemblyName) throws Exception
String.getServiceAssemblyDescriptor in interface DeploymentServiceMBeanserviceAssemblyName - name of the service assembly to be queried;
must be non-null and non-emptyException - if a processing error occurspublic String getServiceUnitDescriptor(String serviceAssemblyName, String serviceUnitName) throws Exception
String.serviceAssemblyName - name of the service assembly to be queried;
must be non-null and non-emptyserviceUnitName - name of the service unit to be queried;
must be non-null and non-emptyException - if a processing error occurspublic String[] getDeployedServiceAssembliesForComponent(String componentName) throws Exception
getDeployedServiceAssembliesForComponent in interface DeploymentServiceMBeancomponentName - name of the component to query; must be non-null
and non-emptyException - if a processing error occurspublic String getServiceAssemblyName(String serviceUnitName, String componentName) throws Exception
serviceUnitName - - service unit identifiercomponentName - - component identifierExceptionpublic String[] getComponentsForDeployedServiceAssembly(String serviceAssemblyName) throws Exception
getComponentsForDeployedServiceAssembly in interface DeploymentServiceMBeanserviceAssemblyName - the service assembly to be queried; must be
non-null and non-emptyException - if a processing error occurspublic boolean isDeployedServiceUnit(String componentName, String serviceUnitName) throws Exception
isDeployedServiceUnit in interface DeploymentServiceMBeancomponentName - name of the component to query; must be non-null
and non-emptyserviceUnitName - name of the subject service unit; must be non-null
and non-emptytrue if the named service unit is currently deployed
to the named componentExceptionpublic String getState(String serviceAssemblyName) throws Exception
DeploymentServiceMBean.SHUTDOWN, DeploymentServiceMBean.STOPPED, DeploymentServiceMBean.STARTED.getState in interface DeploymentServiceMBeanserviceAssemblyName - name of the assembly to query; must be
non-null and non-emptyDeploymentServiceMBean.SHUTDOWN, DeploymentServiceMBean.STOPPED, or DeploymentServiceMBean.STARTEDException - if there is no such assemblypublic String getServiceUnitState(String componentName, String serviceUnitName) throws JBIException
componentName - - the component nameserviceUnitName - - name of the service unitJBIException - if the component is not installed or if the
service unit is not deployed to the component.DeploymentServiceMBeanpublic String deployFromRepository(String serviceAssemblyName) throws JBIException
serviceAssemblyName - - name of the registered service assembly.JBIException - if the service assembly is not registered or
deploy fails.public String undeploy(String serviceAssemblyName, boolean force) throws Exception
serviceAssemblyName - name of the Service Assembly that is to be
undeployed; must be non-null and non-emptyforce - if this flag is set to true any undeployment errors thrown
from the component will be ignored as the service assembly is forcefully
undeployed.Exception - if compelete undeployment failspublic String undeploy(String serviceAssemblyName, boolean force, boolean keep) throws Exception
serviceAssemblyName - name of the Service Assembly that is to be
undeployed; must be non-null and non-emptyforce - if this flag is set to true any undeployment errors thrown
from the component will be ignored as the service assembly is forcefully
undeployed.keep - if true the service assembly archive should not be removed
from the domain. If false the archive is removed if the service
assembly is not deployed on any instances.Exception - if compelete undeployment failspublic String shutDown(String serviceAssemblyName, boolean force) throws Exception
serviceAssemblyName - name of the assembly to be shut down; must be
non-null and non-emptyforce - if this flag is true, the service assembly is shutdown forcefully.
Any exceptions thrown by the component for service unit shutdown are ignored.Exception - if there is no such assemblyException - if the assembly fails to shut downpublic boolean isServiceAssemblyDeployedInInstance(String saName, String instanceName) throws ManagementException
saName - - the SA nameinstaneName - - the instance nameExceptionManagementExceptionCopyright © 2011-2016 OpenESB Community. All Rights Reserved.