[jboss-as7-dev] ServerDeploymentManager: Problems getting the result future of a deployment action
Brian Stansberry
brian.stansberry at redhat.com
Mon Apr 11 11:33:30 EDT 2011
On 4/11/11 10:02 AM, André Dietisheim wrote:
> Hi Brian
>
> On 04/11/2011 04:40 PM, Brian Stansberry wrote:
>> Can you file a JIRA please?
>>
>
> sure: https://issues.jboss.org/browse/JBAS-9288
>
> so basically, the way I proceed is correct?
> Weird enough, I get mixed results. My deployment seems to work in some
> cases, then it doesn't in others. I never saw the war appear in the
> deployment dir, but it appeared in a subdir of tmp/vfs.
The deployments/ dir is only for stuff that the FS deployment scanner is
deploying for you. When you deploy via the management API, the content
is thereafter managed by the server. It actually ends up in
data/contents but isn't meant to be manipulated.
> I'd appreciate a lot if you could give me some pointers that would help
> me to find out what I miss (I stepped through some parts of the code and
> saw the responses being analyzed in
> AbstractModelControllerClient#ExecuteAsynchronousRequest#receiveResponse(InputStream).
My assumption was there's a bug in there or in the generation of the
response, but I won't be able to look into it today.
>
>
> Thanks
> André
>
>> On 4/11/11 9:02 AM, André Dietisheim wrote:
>>> Hi
>>>
>>> I actually try to get the result of a deployment and unfortunately fail
>>> so far.
>>>
>>> I proceed in the following manner:
>>>
>>> I add an deployment, get the action that was created for it, and then
>>> try to retrieve the result of this action:
>>>
>>> ...
>>> ServerDeploymentManager manager =
>>> ServerDeploymentManager.Factory.create(client);
>>> InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
>>> builder = builder.add(file.getName(), file).addDeploy();
>>> DeploymentAction action = builder.getLastAction();
>>> DeploymentPlan plan = builder.build();
>>> Future<ServerDeploymentPlanResult> planResult = manager.execute(plan);
>>> ServerDeploymentPlanResult result = resultFuture.get(timeout,
>>> TimeUnit.MILLISECONDS);
>>> ServerDeploymentActionResult actionResult =
>>> result.getDeploymentActionResult(action.getId());
>>> ....
>>>
>>> Unfortunately actionResult is always null.
>>> Stepping through the code did not help a lot so far: The result of the
>>> server deployment plan seems always to hold an empty map of
>>> actionResults (DeploymentPlanResultImpl#actionResults).
>>>
>>> What do I miss? I'd appreciate a lot some pointers here.
>>>
>>> Thanks
>>> André
>>>
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
More information about the jboss-as7-dev
mailing list