Friday 7 December 2007

Deployment/Redeployment

Deployment

WebLogic Server allows you to store deployment units either as a single archive file, or as an exploded directory that contains the same contents of the archive file. An archive file is a single file that contains all of an application's or module's classes, static files, directories, and deployment descriptor files.

Deploy user applications on managed server instances. This separates the administration application (console) and the domain configurations from user applications. Avoid using automatic deployment of applications in production and multiple-server environments. Running the WebLogic domain in "Production Mode" will disable the automatic deployment in production. If you create scripts for deploying applications as a part of an overall build, consider using the wldeploy Ant task.

If you deploy an application (or module) with the On Future Redeploys option set to Ignore Roles and Policies From DD one or more times before setting it to Initialize Roles and Policies From DD, you can set security policies and security roles using the admin console. But these changes using admin console will override security specified in deployment descriptors.

Tips

1. Use production mode to run production applications.

2. Avoid deploying user applications on admin server instance.

3. To specify the server's default Web application, use an empty context-root element or an element with a value "/" in the weblogic.xml or application.xml file.

4. Changing security policies for an application after deployment in the admin console overrides the policies in the deployment descriptor.

Redeployment

Once you deploy an application, you can redeploy the application itself or selected parts of the application. Redeploying an entire application involves unloading all its classes and then deploying the application again with the changed files. Redeploying an application in production is a serious undertaking that can affect performance, so plan application updates carefully.
If a Web application is in production and in use, redeploying causes WebLogic Server to lose all active HTTP sessions. HTTP session can be restore by turning a special property ON in the WebLogic specific deployment descriptor file (weblogic.xml).

Tips

1. If you have modified only static files, it is possible to refresh them without redeploying the entire application.

2. Use command-line option to partially redeploy an expanded application (weblogic.Deployer … -redeploy …).

3. For changing deployment parameters without changing the application, use alternate deployment descriptors.

4. To simplify re-distributing application archives to multiple WebLogic Server instances during redeployment use stage mode deployment.

5. A managed server with all application staged can be started and be made fully functional in independence mode if admin server is not available.

1 comment:

MNS said...

hello i am new to weblogic,What is stage,no stage,external stage deployments in weblogic please explain with example?