1)${DOMAINHOME}/bin/startWebLogic.sh calls ${DOMAINHOME}/bin/setDomainEnv.sh.
2)setDomainEnv.sh calls ${WL_HOME}/common/bin/commEnv.sh. commEnv.sh sets a series of common environment variables, none of which are directly related to the particular domain: for example, WL_HOME, JVM memory options, other JVM parameters, and system properties. These variables are set for use by any WebLogic Server domains, as well as system utilities like Node Manager, etc. A particular domain can (and usually does) override these settings, so setting them here may not actually change the settings for your particular domain. It probably will impact the settings for Node Manager, however.
3)After commEnv.sh is executed, setDomainEnv.sh will set other memory parameters and variables. In fact, the settings from commEnv.sh are overridden here.
4)After setDomainEnv.sh completes, the system returns to ${DOMAINHOME}/bin/startWebLogic.sh, organizes the parameters, and calls java to start up the JVM and start WebLogic Server.
5)If we want to change the HVM parameters, the best location is in startWebLogic.sh or setDomainEnv, either will do . There is not much difference for setting JAVA_OPTIONS in startWebLogic.sh or setDomainEnv . Generally its used to improve the performance .
Thanks