org.ow2.petals.jbi.management.task.deployment.deploy
Class DeployAllSUTask

java.lang.Object
  extended by org.ow2.petals.jbi.management.task.AbstractLoggableTask
      extended by org.ow2.petals.jbi.management.task.deployment.deploy.DeployAllSUTask
All Implemented Interfaces:
Task

public class DeployAllSUTask
extends AbstractLoggableTask

This task creates service unit lifecycle for each Service Unit included into the service assembly, register it to the Service Assembly then executes the deployment of the service units.
Inputs : Jbi, sa install root URI, XMLResult, SUInstallRoots Map, SU task processors List
Outputs : ServiceAssemblyLifeCycle
The task has got a non-robust approach : it stops at the first subtask failed
and have the undo capability.

Author:
ofabre - EBM Websourcing, Frederic Gardes - eBM Websourcing

Field Summary
protected  DeploymentTaskFactory deploymentTaskFactory
           
 
Fields inherited from class org.ow2.petals.jbi.management.task.AbstractLoggableTask
log
 
Constructor Summary
DeployAllSUTask(org.ow2.petals.util.LoggingUtil log, DeploymentTaskFactory deploymentTaskFactory)
           
 
Method Summary
protected  java.util.List<TaskProcessor> deploySUS(java.net.URL installationUrl, ServiceAssemblyLifeCycle saLifeCycle, org.ow2.petals.jbi.descriptor.original.generated.Jbi descriptor, java.util.Map<java.lang.String,java.net.URL> suInstallUrls, XMLResult xmlResult)
          Deploy all Service Units to the JBI container
 void execute(Context context)
          Launch the task with the given context.
 void undo(Context context)
          Reverse the task in order to retrieve the environ state before execution of this task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deploymentTaskFactory

protected DeploymentTaskFactory deploymentTaskFactory
Constructor Detail

DeployAllSUTask

public DeployAllSUTask(org.ow2.petals.util.LoggingUtil log,
                       DeploymentTaskFactory deploymentTaskFactory)
Method Detail

execute

public void execute(Context context)
             throws java.lang.Exception
Description copied from interface: Task
Launch the task with the given context. Task can modify information included in this context during execution.

Parameters:
context - the execution context handling input and output information
Throws:
java.lang.Exception - if an error occurs during Task processing

deploySUS

protected java.util.List<TaskProcessor> deploySUS(java.net.URL installationUrl,
                                                  ServiceAssemblyLifeCycle saLifeCycle,
                                                  org.ow2.petals.jbi.descriptor.original.generated.Jbi descriptor,
                                                  java.util.Map<java.lang.String,java.net.URL> suInstallUrls,
                                                  XMLResult xmlResult)
                                           throws java.lang.Exception
Deploy all Service Units to the JBI container

Parameters:
installationRoot - the root URI of the service assembly
saLifeCycle - the ServiceAssemblyLifeCycle of the service assembly
descriptor - the service assembly jbi descriptor
suInstallRoots - a map of all SU install roots
xmlResult - xml task result
Throws:
ManagementException - if an sus deployment fails caused by a severe error of the container
java.lang.Exception

undo

public void undo(Context context)
          throws java.lang.Exception
Description copied from interface: Task
Reverse the task in order to retrieve the environ state before execution of this task.

Parameters:
context - the execution context handling input and output information
Throws:
java.lang.Exception - if an error occurs during Task unprocessing


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.