Sunday, October 24, 2010

Partial Redeployment of Static Files

Partial redeployment is available only for applications that are deployed using an exploded archive directory.

An exploded archive directory contains the same files and directories as a jar archive. However, the files and directories reside directly in your file system and are not packaged into a single archive file with the jar utility.]

WebLogic Server enables you to redeploy selected files in a running application, rather than the entire application at once. 

This feature is generally used to update static files in a running Web application, such as graphics, static HTML pages, and JSPs. 

In a production environment, you may occasionally need to refresh the static content of a Web application module—HTML files, image files, JSPs, and so forth—without redeploying the entire application. If you deployed a Web application or an Enterprise Application as an exploded archive directory, you can use the weblogic.Deployer utility to update one or more changed static files in-place. 

To redeploy a single file associated within a deployment unit, specify the file name at the end of the redeploy command. For example:

java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password weblogic -name myApp -redeploy myApp/copyright.html

Always specify the pathname to updated files relative to the root directory of the exploded archive directory. In the above example, the Web application is deployed as part of an Enterprise Application, so the module directory is specified (myApp/copyright.html).

If the Web application module had been deployed as a stand-alone module, rather than as part of an Enterprise Application, the file would have been specified alone (copyright.html).

You can also redeploy an entire directory of files by specifying a directory name instead of a single file. 

For example:

java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password weblogic -name myApp -redeploy myApp/myjsps

In the above example, all files and subdirectories located in the myjsps subdirectory of the Enterprise Application are redeployed in-place.

No comments:

Post a Comment