[jboss-as7-dev] ServerDeploymentManager: Problems getting the result future of a deployment action

Brian Stansberry brian.stansberry at redhat.com
Tue Apr 12 14:46:53 EDT 2011


On 4/11/11 11:41 AM, André Dietisheim wrote:
> On 04/11/2011 05:33 PM, Brian Stansberry wrote:
>
> The next thing in my pipeline would be to have some possibility to get
> feedback about the progress of the deployment. Is there any way to
> achieve that (did not spot any in the API so far)?
> The basic idea is to provide the user a progress bar with some
> information about the artifacts being deployed.
>

The intent behind the overloaded methods in ModelControllerClient that 
take a ResultHandler[1] is to support this kind of thing, but

1) You can't use the ServerDeploymentManager convenience API; you'd have 
to create the deployment operations and analyze the response yourself.

2) It's pretty doubtful that the server-side is going to send back 
incremental updates to the ResultHandler.handleResultFragment() method, 
at least in AS 7.0. More likely the entire result would get sent at the 
end. That behavior complies with the API contract, but admittedly 
defeats the purpose. It's the kind of thing that can be improved upon 
later. So I wouldn't base a feature on it.

Ideally deployments will be so fast there's no need, although for huge 
deployments or deployments to the domain that get rolled in series to 
many servers, a progress meter makes sense. A higher priority will be 
sending back result fragments for multi-server updates.


[1] For example:

/**
  * Execute an operation, possibly asynchronously, sending updates and 
the final result to the given handler.
  *
  * @param operation the operation to execute
  * @param handler the result handler
  * @return a handle which may be used to cancel the operation
  */
OperationResult execute(Operation operation, ResultHandler handler);



-- 
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat



More information about the jboss-as7-dev mailing list