WebLogic Deployment: Answers to Frequently Asked Questions

Here is a number of answers to many question that typically pop up when explaining WebLogic deployment concepts

 

What is the difference between staged deployment and non-staged deployment?

You maybe want to read the official Oracle documentation regarding staged deployment first which gives a great overview. This Q&A cannot replace reading the manuals.

Anyway, here is short answer: Staged deployment will copy your deployment units onto the deployment servers, place them into the $WL_HOME/servers/SERVER_NAME/stage directory and deploy them from there.

Good, so when does staged deployment make sense?

In short: When the target servers cannot access the source file of your deployment unit use staged deployment, e.g. because there is no shared file system.

 

What happens if I use staged deployment although I have shared domain directory for every server?

You will unnecessarily multiply the deployment units in every servers stage directory. The more servers you have, the more time and space it will cost you.

 

So if I use staged deployment and then delete the deployment, will the be deleted from the stage directory?

I just tried this with WebLogic 12c because I heard complaints about this not working in previous version. So far I could only reproduce it on one machine, but then it is working.

 

I don’t get it. When I look at the deployment wizzard in WebLogic 12c it doesn’t make sense?!

That’s correct. It doesn’t make sense. The deployment screen is very confusing (you might say “incorrect”) since the horizontal separators are wrong. See the screenshot below for how they are (in red) and how they should be to make sense (in green). However, this glitch is not new. You can observe the same for at least for WebLogic 10 and 11. Sometimes I wonder if anybody at all wonders…

 

Production Redeployment

 

First of all I recommend to browse the official Oracle documentation about production redeployment. For short step-by-step instructions have a look at Jay’s article in Middleware Magic.

 

Can I add the version number for production redeployment in the admin server console?

To the best of knowledge, no. For some reason you can only see the version number during deployment, but you cannot set it. You can set it in the MANIFEST.MF file (recommended by Oracle) file or during deployment with weblogic.Deployer:

 


java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password weblogic

-deploy -name purchaseSurfWear.war -source /apps -targets surfCluster

-stage -appversion 2b

or

use the WebLogic Scripting Tool WLST deploy() command and add the -archiveVersion under [options]

deploy( appName , path , [ targets ], [ stageMode], [planPath], [options])

 

 

Should I deploy to a cluster or to all servers in the cluster? What is the difference?

If you deploy to a cluster and later extend the cluster by adding another server, then the deployment will be available automatically to the new server (without redeploying or changing the target settings of the deployment).

 

Can I delete the source file of an application after deploying, since staged deployment should copy the deployment unit onto the target server?

In short: no, you cannot. One obvious reason is the functionality described above.

Here is a quote from the Oracle documentation: “After you have deployed your application, do not change or remove the original source files for the application. The WebLogic Server deployment framework uses the files to manage deployed applications. Changing or removing the original source files may result in unexpected application behavior.”

 

Homework for Oracle / My wishlist for deployment features in WebLogic 13f:

- Change the admin console so that a version number can be added during deployment.

- To confuse people less, get the horizontal lines in the deployment wizzard of the WebLogic 12c admin console right as described above.


Speak Your Mind

*