1 Reply Latest reply on Nov 26, 2019 9:54 PM by Steff2-Oracle

    Versioning an application WAR in weblogic 12.2.1.3

    TechieInnovator

      I use weblogic 12.2.1.3. I had non versioned application war deployed to server and works fine. No issues. After deployment, it used to create a folder  name called "myapp"  in /tmp/_WL_user folder

       

      I want to make it versioned. So , I have added following entry in MANIFEST.MF file META-INF folder

       

      Weblogic-Application-Version: 1.2.3-RELEASE

       

      It add version number now and works fine. But at server it creates a folder name called "myapp_1.2.3-RELEASE"  in /tmp/_WL_user folder instead of just "myapp" folder. It creates some issue for me giving permission to credential stores, etc.

       

       

      what should I need to configure to not to create folder name like "myapp_1.2.3-RELEASE"  in /tmp/_WL_user and instead just create "myapp" with version number also?

       

       

        • 1. Re: Versioning an application WAR in weblogic 12.2.1.3
          Steff2-Oracle

          Hello,

           

          This is expected that WebLogic Server appends an Archive Version Number to the Application Name.

          Please, see the note below :

          https://support.oracle.com/epmos/faces/DocumentDisplay?id=1900505.1

           

          -

           

          As a test, you can use the -appversion option from the commandline too. It will work the same way.

           

           

          Using side by side deployment strategy, you can experience how to use the WebLogic server to re-deploy

          a new version of production application with out interrupting the availability of the application to new client request.

           

          The way the new client gets connected to the new version of the application and the previous version

          of the application is still in use by the older clients and gets retrived after the client disconnects.

           

          For instance:

           

          1) Copy benefits.war in new folder and deploy

           

          2) setDomainEnv.cmd

           

          3) java WebLogic.Deployer –adminurl  t3://localhost:7001 –username <your_username>  –password <your_password> –name benefits  –source <app_location>/benefits.war –nostage  –targets ms1,ms2 –deploy -appversion version1

           

          4) Copy benefits.war into another folder(new_war) and extract it

                     jar –xvf benefits.war

           

          5) Modify your application, for example :

             Edit the welcome file, find the string of "Color:navy"   and replace it with "Color:green" .

           

          6) Save

           

          7) jar –cvf benefits.war *(or) jar –cvf benefits.war “.”

           

          8) Delete all files except  benefits.war

           

          9) Now deploy benefits.war :

           

          java WebLogic.Deployer –adminurl  t3://localhost:7001 –username <your_username>  –password <your_password> –name benefits  –source <New_app_location>/benefits.war –nostage  –targets ms1,ms2 –deploy -appversion version1

           

          10) Test the application version1 before version2 deploy. After version2 gets deployed, test the application to see the difference.

              The version1 application is in retired state.

           

           

          Remarks:

          --------

          The version string specified with -appversion is applied only when the deployment source files do not specify a version string in MANIFEST.MF.

           

          Caution:

             Do not use -appversion to deploy or redeploy in a production environment unless you are certain

             the application follows Oracle's programming conventions for production redeployment.

             See Section 8.3.3, "Requirements and Restrictions for Production Redeployment".

             https://docs.oracle.com/middleware/1213/wls/DEPGD/DEPGD.pdf

            

             Using production redeployment with an application that does not follow the programming conventions can cause corruption of global resources

             or other undesirable application behavior.

           

           

          I believe this information should help you too.

           

          Best Regards,

          Stephan

          1 person found this helpful