Showing posts with label Middleware home. Show all posts
Showing posts with label Middleware home. Show all posts

Monday, December 17, 2012

Different Memory Argument values for SOA Servers and BAM Servers In Weblogic 11g.



This post is about providing specific memory arguments values to SOA server and BAM servers in Weblogic 11g.

There are two scenarios:

  1. Admin Server is Started using the startWeblogic.cmd or startWeblogic.sh file and all other servers are started using startManagedWeblogic.cmd or startManagedWeblogic.sh 

  2. Admin Server is Started using the startWeblogic.cmd or startWeblogic.sh file and all other servers are started using the Admin Server Console.

Case1 :  

Admin Server is Started using the startWeblogic.cmd or startWeblogic.sh file and all other servers are started using startManagedWeblogic.cmd or startManagedWeblogic.sh 

First of all we have to analyse the startWeblogic.sh file that is used to start the Admin Server and the startManagedWeblogic.sh file that is used to start all other managed servers such as SOA server and BAM server.
Both the above mentioned file uses setDomainEnv.sh file to set the Domain related environment.
And setDomainEnv.sh file uses setSOADomainEnv.sh file for setting SOA specific environments.
So the memory related arguments like Xmx and Xms are picked up from the file :setSoaDomainEnv.sh file present in the $DomainHome/bin directory.
So, in order to provide different Xmx and Xms values for Admin Server , SOA server and BAM server we have to modify the setSOADomainEnv.sh file as shown below :
Imp : Please make sure to take backup of all the original files before modifying them .
In setSOADomainEnv.sh file comment the below lines :
# DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
# PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
Insert the below lines replace the above commented code :
# line to specify different Xmx and Xms values to soa_server and bam_server.

if [ "${SERVER_NAME}" = "soa_server1" ] || [ "${SERVER_NAME}" = "soa_server2" ]; then
DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
elif [ "${SERVER_NAME}" = "bam_server1" ] || [ "${SERVER_NAME}" = "bam_server2" ]; then
DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "AdminServer" ]; then
DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
else
DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
fi

# end of code

Case 2 :  

Admin Server is Started using the startWeblogic.cmd or startWeblogic.sh file and all other servers are started using the Admin Server Console.

In this case, the Memory Arguments can be provided to from the Admin Server Console using the below steps :

  •  Login into the Weblogic Administration Console using URL :http://admin_server_hostname:port/console
  • Expand Environment Tree available on the left hand panel of the Admin Console.
  • Click on Servers .
  • For each Server say ( soa_server1 , and bam_server ) click on the server name .
  • Then click on the Configuration tab.
  • Then go to the Server Start tab available on the top of the page.
  • Add the memory values in the Arguments field as shown below. There is no need to use newline. You can provide as many memory options as you want in this area and all the options will be separated by one white space character only.

-Xmx2048m -Xms2048m
  • Click Save

Weblogic 12c Installation Directories Structure


Exploring Middleware Home Directory

By default, Weblogic 12c choose C:\Oracle\Middleware directory for installation on Windows.

Oracle\Middleware Directory

Directory
Contents
/ coherence_3.7Coherence home directory
/ jdk160_29Sun JDK ((Recommended for Development Mode))
/ jrockit_versionJRockit JDK (Recommended for Production Mode)
/ logsLocation for various log files about installation and uninstallation for the Middleware home directory.
/modulesLocation for modules such as Apache Ant
/ oepe_12.1.1.0.1Files related to Oracle Enterprise Package for Eclipse
/ patch_ocp371
/ patch_oepe101
/user_projectsContains Domain
/ utilscontains utilities that are used to support the installation of all products installed in this home directory.
/ wlserver_12.1WebLogic Server home directory
.homeThis file contains the information about the Middleware home directory.
domain-registry.xmlThis registry file contains the location of all domains currently registered with this WebLogic Server installation. Whenever you add a new domain, it is registered in this file.
ocm.rspThis response file contains information about the Oracle Configuration Manager (OCM) installation.
registry.datThis registry contains product-related information, such as version number, patch set level, patch level, and location of the product installation directories. It also contains the name of the installed JDK(s) and the Java home.
registry.xmlThis is an encrypted version of the registry.xml file.

WebLogic Server Home Directory(WL_HOME): By default it is located in theOracle\Middleware\wlserver_12.1

WebLogic Server Domain Directory

Directory
Content
/ autodeployIn a development environment, the server will automatically deploy any applications or modules you place here. You must run the server in development mode for it to take advantage of the automatic deployment feature.
/ binContains the start and stop scripts
/ configContains the key domain configuration file, config.xml.
/ console-extContains any Administration Console extensions you’ve created
/ init-info This directory contains files that are used for WebLogic domain provisioning. You should not modify any files in this directory.
/ libYou can place JAR files in this directory so they can be available to all applications running on the domain’s server instances.
/ securityHolds security-related files such as SerializedSystemIni.dat.
/ serversThis is an important directory that contains a separate subdirectory for each of the servers in your domain, including both Admin and Managed Servers.
fileRealm.properties
startWebLogic.cmd
startWebLogic.sh
Note:
Note while creating  the Middleware home directory:
  • Do not include spaces in the name of your Middleware home directory otherwise the CLASSPATH may not be resolved properly.
  •  You can install only one instance of each version of a WebLogic Server product in a single Middleware home directory. For example, you can install only one instance of the current version of WebLogic Server in a Middleware home directory, but you can have an earlier version of WebLogic Server in a separate Middleware home directory.
  • If the home directory is not empty and it does not contain registry.xml, or if any of the product installation directories are not empty, one of the following messages is displayed:
For home directory selection task—Middleware home directory is not empty. Proceed with installation?
For product installation directory selection task—One or more installation directories are not empty. Proceed with installation?