Weblogic production mode And development mode

Oracle Weblogic Server

There are several ways to configure the mode of the domain.

Changing Modes Using the Administration Console

Using the Administration Console is the easiest way to change from development mode to production mode or vice versa.

Please Follow below steps:

1. In the left pane of the Console, under Domain Structure, select the domain name.
2. Select Configuration -> General and select the Production Mode check box.
3. Click Save.
4. Shut down any servers that are currently running.
5. Invoke the domain’s startWebLogic script. The Administration Server starts in the new mode.
6. If the domain contains Managed Servers, start the Managed Servers.

Using WLST to Change Modes

WLST to change to production mode example:

wls:/offline> connect('username','password')
wls:/mydomain/serverConfig> edit()
wls:/mydomain/edit> startEdit()
Starting an edit session ...
Started edit session, please be sure to save and activate your changes once you are done.
wls:/mydomain/edit !> cmo.setProductionModeEnabled(true)
wls:/mydomain/edit !> activate()
Activating all your changes, this may take a while ...
The edit lock associated with this edit session is released
once the activation is completed.
The following non-dynamic attribute(s) have been changed on MBeans
that require server re-start:
MBean Changed : com.bea:Name=AdminServer,Type=WebServerLog,Server=AdminServer,
WebServer=AdminServer
Attributes changed : RotateLogOnStartup
MBean Changed : com.bea:Name=AdminServer,Type=WebServerLog,Server=AdminServer,
WebServer=AdminServer
Attributes changed : RotateLogOnStartup
MBean Changed : com.bea:Name=TPDomain,Type=Log
Attributes changed : RotateLogOnStartup
Activation completed
wls:/mydomain/edit> exit()

To change to development mode instead, simply setProductionModeEnabled to false rather than true.

Using a Command-Line Argument to Change Modes

To specify a mode from the command line, include the following argument in the startup command:

-Dweblogic.ProductionModeEnabled=true

Specify false rather than true to specify development mode.

NOTES:
This command line argument is deprecated in Oracle Weblogic Server 10.3.0, so this option should only be used with WLS versions from WLS 9 to 10.0.2.

If you start the administration server with the -Dweblogic.ProductionModeEnabled=false option, it will start in development mode, but the console will still reflect the value of <production-mode-enabled> in config.xml and say that it is enabled in Production Mode when in fact it is not.

Setting mode by editing the Configuration Files Manually

It is not recommended to change the configuration files manually because problems can occur if a mistake is made.

production/development mode can be configured in the config.xml file using below steps:

1. Stop the servers running in a domain.
2. Open the config.xml file location under MIDDLEWARE_HOME/domains/<domain_name>/config.
3. Change the production-mode entry to false (for development mode) or true (for production mode), save the file, and exit.
4. Start all servers.

NOTE: You can also set the value PRODUCTION_MODE to true or false in setDomainEnv.sh file but if you want to backout the change you need to change the config.xml file.

 

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

1 Response

  1. Binh Thanh Nguyen says:

    Thanks, nice tips

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.