/management/wls/{version}/deployments/application/id/{application-name}/update

This resource updates an application. Use this resource when you want to update the dynamic elements in a deployment plan without redeploying the application; no sessions will be lost. Use the redeploy resource to update the actual deployment. It will also update all changes in a deployment plan, but sessions will be lost.

The resource supports the following methods:

POST Method

The POST method updates the application identified by the resource URL. You should invoke this method after you have updated the underlying deployment plan.

Roles

Administrator, Deployer

Request Query Parameters

This resource launches a job to update the application.

_detached

(Optional) Specifies whether this method runs in detached (background) mode or synchronously.

If the __detached=true query parameter is specified (detached invocation), then this method returns immediately after launching the job. Otherwise, it waits for the job to complete, fail, or timeout (synchronous invocation).

Response Body

If the method was invoked synchronously and successfully launched the job, the response body includes a DeploymentJob entity containing the state of the job (completed, failed, or still running in the case of a timeout) as well as a link to the job resource.

This method can return the following links:

  • uri=/wls/jobs/deployment/{job-id} rel=job title=id

Response Codes

If the method was invoked synchronously and the job successfully completed, the method returns a 200 OK status code. If the job timed out, the method returns a 202 Accepted status code.

If the method was invoked detached and successfully launched the job, the method returns a 202 Accepted status code and a link to the job resource. In this case, the response does not include a DeploymentJob entity.

Example

Example 1   Updating an Application

This example uses the POST method to update an application with deployment plan changes.

Example Request

curl -v \
--user username:password \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X POST http://localhost:7001/management/wls/latest/deployments/application/id/BasicApp/update

Example Response

HTTP/1.1 400 Bad Request

Response Body:
{
    "messages": [{
        "message": "Failed to update the application 'BasicApp'.",
        "severity": "FAILURE"
    }],
    "links": [{
        "rel": "job",
        "uri": "http:\/\/localhost:7001\/management\/wls\/latest\/jobs\/deployment\/id\/37"
    }],
    "item": {
        "operation": "update",
        "error": "\n The application BasicApp cannot have the resource \/deployments\/BasicApp\/plan\/Plan.xml updated dynamically. Either:\n1.) The resource does not exist. \n or \n2) The resource cannot be changed dynamically. \nPlease ensure the resource uri is correct, and redeploy the entire application for this change to take effect.",
        "status": "failed",
        "beginTime": 1390587229032,
        "endTime": 1390587229322,
        "name": "ADTR-37",
        "id": "37",
        "type": "deployment",
        "targets": [{
            "errors": ["\n The application BasicApp cannot have the resource \/deployments\/BasicApp\/plan\/Plan.xml updated dynamically. Either:\n1.) The resource does not exist. \n or \n2) The resource cannot be changed dynamically. \nPlease ensure the resource uri is correct, and redeploy the entire application for this change to take effect."],
            "status": "failed",
            "name": "myserver",
            "type": "server"
        }],
        "deploymentName": "BasicApp",
        "description": "[Deployer:149026]update application BasicApp on myserver."
    }
}