Weblogic, side-by-side deployment

Weblogic Server supports a nice feature called side-by-side deployment (or versioned deployment). This function is extremely usefull when you need to deploy a new version of an application and still keep the old one up and running. So the running instances will still use the current version and all new instances will be able to invoke the new deployed version of the application.
As soon as all the sessions who’re using the old version of the application are expired, Weblogic will recognize it and will deactivate the old version. So at this moment only the new deployed version is active and all new sessions will make us of it.

So how does this work.

You could either use wlst to deploy the application and specifiy the versionnumber on deployment as one of the parameters or you can use the manifest.mf file. We’ll be using the last one.

  1. Create a webservice project
  2. Edit to manifest file located in WebContent > META-INF and add the next on a new row : ‘WebLogic-Application-Version: v1’
  3. Package the service and deploy it in the console


  1. Go to the Weblogic Console > Deployments. Click ‘Lock & Edit’ and in the deployments part click Install
  2. Select the just created archive
  3. Install this deployment as an application
  4. Optional Settings. And in here we will see the ‘Archive Version’ of our application. Change the name to ‘MyService’ and leave the rest on default value

If you look in the list of deployments we will see our application is labeled with a version indication (v1).
The current version is still active.

Now create a new version of the application and change the v1 in the manifest file to v2, and package it.

Update Deployment

  1. Go to the Weblogic Console > Deployments. Click ‘Lock & Edit’, select the application we want to update (MyService) and in the deployments part click Update
  2. Click Change Path of the source path and select the just created archive (v2), the application will be deployed as version v2

If we now look in the list of deployments, we will see 2 versions of our application deployed.

Version v1 gets status ‘Retired’ and the new version v2 will get status ‘Active’.

Running instances
We have the next scenarios

  1. Version v1 is deployed. Deploy version v2. The new version v2 will get status ‘Active’ and the old version v1 will get status ‘Retired’.
    Since there aren’t any open sessions Weblogic will recognize this and changed the status of the version v1
  2. Version v1 is deployed and has open sessions. Deploy version v2. The new version v2 will get status ‘Active’ and the old version v1 will stay on status ‘Active’ untill all sessions to it will be closes. After that, Weblogic will change the status to ‘Retired’ and the only ‘Active’ version will be v2



About Eric Elzinga
Eric Elzinga I'm an integration consultant located in The Netherlands. Mainly doing projects based on Oracle integration stacks (Oracle SOA Suite/Oracle Service Bus (OSB)), Java development, and opensource integration products.

10 Responses to Weblogic, side-by-side deployment

  1. Pingback: WebLogic Server Version Deployment Feature « Allen's Dream

  2. Pingback: Weblogic, side-by-side deployment | Oracle .. Java .. OpenSource .. SOA

  3. Pingback: Weblogic Deployment Plan « Lukasz's Blog

  4. Mugdha says:

    Nice explanation. Concepts clear. 🙂

  5. Pingback: Confluence: BMC Software

  6. Gaurav says:

    Hi, This is a nice and easy to understand article. I have a question though – For the version 2 of my application, I have some database changes as well. I have added a couple of new tables and modified some of the existing ones. In side-by-side deployment scenario, would different versions of the application access different versions of the database? How would be make it happen – different datasources configured in weblogic? Please help. I have not been able to find a solution to this problem so far.

    Thanks in advance,

  7. kalyan.G says:

    I have a small dought please clarify that sir…in side by side deployment during update u told change the version to v2 where we have to change
    either the file name or in META-INF Please tell me sir…….

    • Eric Elzinga says:

      Hm, it’s a long time back since i tested this. But i think you should not rename the filename, only the version in the meta-inf. Can you test this to verify ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: