Friday, December 2, 2011

Change WebLogic Server Mode from Development to Production and JDK Mode from Client to Server

What does it take to change WebLogic 10.3.x server mode from development to production?

You quickly search on the Internet and quickly land to documentation such as here: http://docs.oracle.com/cd/E21764_01/apirefs.1111/e13952/taskhelp/domainconfig/ChangeRuntimeModes.html . The doc says you just need to go to the WebLogic Console to do it. That is easy, right?

But then the next link or so you may found a blog like http://blogs.oracle.com/learnwithpavan/entry/run_weblogic_in_production_mod , which says you need to set some Java parameter to make that happen.

So, which one is right?

Well, the truth of the matter is, to completely change a server from Development to Production Mode, two things need to happen:

  1. From Console -> Domain -> Production mode, check the Production Mode check box. This change will go into config.xml
  2. In setDomainEnv.sh, set PRODUCTION_MODE=true.
You will notice that if you only do #1, the Java will still start with "-client" option. Only when both of these settings are done, the server will start with ‘-server’ in its Java command line.


For differences between Development mode and Production mode, please refer to http://docs.oracle.com/cd/E21764_01/web.1111/e13814/wls_tuning.htm#i1111053 for details.