Side by Side deployment/Versioning


/* Style Definitions */ table.MsoNormalTable {mso-style-name:”Table Normal”; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:””; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:”Times New Roman”; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

Production redeployment of application/ versioning/ side by side deployment

We need versioning for updating the application in production on runtime. The sessions which are already logged in will be using the previous version of the application and the new sessions created will use the new version of application.

1)In the application, Version-1 in MANIFEST.MF we need to add the following:

Manifest-Version: 1.0

Created-By: 1.5.0_04 (Sun Microsystems Inc.)

Weblogic-Application-Version: Version-1

Version-2 MENIFEST-MF

Manifest-Version: 1.0

Created-By: 1.5.0_04 (Sun Microsystems Inc.)

Weblogic-Application-Version: Version-1

2. Open a command window and browse to your domain bin directory.

3. start Admin server using Startweblogic.cmd.

4. Type setdomainenv.cmd to set your weblogic Domain.

5.Now to deploy the first version run the following command (please change as per your specifications):

C:bea9.1user_projectsdomainsbase_domain>java weblogic.Deployer -appversion 1 -adminurl http://127.0.0.1:7001 -username weblogic -password weblogic -deploy -name deployment_name -source c:/…/ -targets AdminServer

6. Now to Redeploy use the following command:

C:bea9.1user_projectsdomainsbase_domain>java weblogic.Deployer -appversion 2 -adminurl http://127.0.0.1:7001 -username weblogic -password weblogic -redeploy -name deployment_name -source c:/…/ -retiretimeout 120

 

7. We will get the version -1 application in retiring state in the console. The requests which were handled previously by this application will be handled by this version.

8. Version-2 application will have ACTIVE status and will be accepting new requests coming in to the application.

 

Reference:

http://download.oracle.com/otn_hosted_doc/wls/redeployment/wls-side-by-side-non-annotation_viewlet_swf.html

5 comments

  1. C:\bea9.1\user_projects\domains\base_domain>java weblogic.Deployer -appversion 2 -adminurl http://127.0.0.1:7001 -username weblogic -password weblogic -redeploy -name deployment_name -source c:/…/ -retiretimeout 120

    I guess u need to specify -targets AdminServer in the above code..

  2. Yes, it can be done . like below

    deploy(appName='[appName]’,path='[App Source location]’,targets='[cluster/server’s Name]’,stageMode=’stage’,upload=’true’,archiveVersion='[Version-1]’)

    undeploy(appName='[appName])

  3. Can any one please tell me where i can get weblogic 10.3 practice labs?
    Currently i m having wls-9.1-labs

    1. Hi Pavan,

      You can try the sample examples shipped with the weblogic server installation.

      Those are very elaborate.

      Regards,
      Anandraj

Comments are closed.