Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.74 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # WARNING: This file is created by the Configuration Wizard.
  4. # Any changes to this script may be lost when adding extensions to this configuration.
  5.  
  6. # --- Start Functions ---
  7.  
  8. stopAll()
  9. {
  10. # We separate the stop commands into a function so we are able to use the trap command in Unix (calling a function) to stop these services
  11. if [ "X${ALREADY_STOPPED}" != "X" ] ; then
  12. exit
  13. fi
  14. # STOP DERBY (only if we started it)
  15. if [ "${DERBY_FLAG}" = "true" ] ; then
  16. echo "Stopping Derby server..."
  17. ${WL_HOME}/common/derby/bin/stopNetworkServer.sh >"${DOMAIN_HOME}/derbyShutdown.log" 2>&1
  18.  
  19. echo "Derby server stopped."
  20. fi
  21.  
  22. ALREADY_STOPPED="true"
  23. }
  24.  
  25. classCaching()
  26. {
  27. echo "Class caching enabled..."
  28. JAVA_OPTIONS="${JAVA_OPTIONS} -Dlaunch.main.class=${SERVER_CLASS} -Dlaunch.class.path="${CLASSPATH}" -Dlaunch.complete=weblogic.store.internal.LockManagerImpl -cp ${WL_HOME}/server/lib/pcl2.jar"
  29. export JAVA_OPTIONS
  30. SERVER_CLASS="com.oracle.classloader.launch.Launcher"
  31. }
  32.  
  33. # --- End Functions ---
  34.  
  35. # *************************************************************************
  36. # This script is used to start WebLogic Server for this domain.
  37. #
  38. # To create your own start script for your domain, you can initialize the
  39. # environment by calling @USERDOMAINHOME/setDomainEnv.
  40. #
  41. # setDomainEnv initializes or calls commEnv to initialize the following variables:
  42. #
  43. # BEA_HOME - The BEA home directory of your WebLogic installation.
  44. # JAVA_HOME - Location of the version of Java used to start WebLogic
  45. # Server.
  46. # JAVA_VENDOR - Vendor of the JVM (i.e. BEA, HP, IBM, Sun, etc.)
  47. # PATH - JDK and WebLogic directories are added to system path.
  48. # WEBLOGIC_CLASSPATH
  49. # - Classpath needed to start WebLogic Server.
  50. # PATCH_CLASSPATH - Classpath used for patches
  51. # PATCH_LIBPATH - Library path used for patches
  52. # PATCH_PATH - Path used for patches
  53. # WEBLOGIC_EXTENSION_DIRS - Extension dirs for WebLogic classpath patch
  54. # JAVA_VM - The java arg specifying the VM to run. (i.e.
  55. # - server, -hotspot, etc.)
  56. # USER_MEM_ARGS - The variable to override the standard memory arguments
  57. # passed to java.
  58. # PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.
  59. # DERBY_HOME - Derby home directory.
  60. # DERBY_CLASSPATH
  61. # - Classpath needed to start Derby.
  62. #
  63. # Other variables used in this script include:
  64. # SERVER_NAME - Name of the weblogic server.
  65. # JAVA_OPTIONS - Java command-line options for running the server. (These
  66. # will be tagged on to the end of the JAVA_VM and
  67. # MEM_ARGS)
  68. # CLASS_CACHE - Enable class caching of system classpath.
  69. #
  70. # For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"
  71. # (http://download.oracle.com/docs/cd/E23943_01/web.1111/e13708/overview.htm).
  72. # *************************************************************************
  73.  
  74. umask 037
  75.  
  76.  
  77. # Call setDomainEnv here.
  78.  
  79. DOMAIN_HOME="/weblogic/Oracle/Middleware/user_projects/domains/weblogic"
  80.  
  81. . ${DOMAIN_HOME}/bin/setDomainEnv.sh $*
  82.  
  83. SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"
  84.  
  85. SAVE_CLASSPATH="${CLASSPATH}"
  86.  
  87. # Start Derby
  88.  
  89. DERBY_DEBUG_LEVEL="0"
  90.  
  91. if [ "${DERBY_FLAG}" = "true" ] ; then
  92. ${WL_HOME}/common/derby/bin/startNetworkServer.sh >"${DOMAIN_HOME}/derby.log" 2>&1
  93.  
  94. fi
  95.  
  96. JAVA_OPTIONS="${SAVE_JAVA_OPTIONS}"
  97.  
  98. SAVE_JAVA_OPTIONS=""
  99.  
  100. CLASSPATH="${SAVE_CLASSPATH}"
  101.  
  102. SAVE_CLASSPATH=""
  103.  
  104. trap 'stopAll' 1 2 3 15
  105.  
  106.  
  107. if [ "${PRODUCTION_MODE}" = "true" ] ; then
  108. WLS_DISPLAY_MODE="Production"
  109. else
  110. WLS_DISPLAY_MODE="Development"
  111. fi
  112.  
  113. if [ "${WLS_USER}" != "" ] ; then
  114. JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.username=${WLS_USER}"
  115. fi
  116.  
  117. if [ "${WLS_PW}" != "" ] ; then
  118. JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.password=${WLS_PW}"
  119. fi
  120.  
  121. if [ "${MEDREC_WEBLOGIC_CLASSPATH}" != "" ] ; then
  122. if [ "${CLASSPATH}" != "" ] ; then
  123. CLASSPATH="${CLASSPATH}${CLASSPATHSEP}${MEDREC_WEBLOGIC_CLASSPATH}"
  124. else
  125. CLASSPATH="${MEDREC_WEBLOGIC_CLASSPATH}"
  126. fi
  127. fi
  128.  
  129. echo "."
  130.  
  131. echo "."
  132.  
  133. echo "JAVA Memory arguments: ${MEM_ARGS}"
  134.  
  135. echo "."
  136.  
  137. echo "WLS Start Mode=${WLS_DISPLAY_MODE}"
  138.  
  139. echo "."
  140.  
  141. echo "CLASSPATH=${CLASSPATH}"
  142.  
  143. echo "."
  144.  
  145. echo "PATH=${PATH}"
  146.  
  147. echo "."
  148.  
  149. echo "***************************************************"
  150.  
  151. echo "* To start WebLogic Server, use a username and *"
  152.  
  153. echo "* password assigned to an admin-level user. For *"
  154.  
  155. echo "* server administration, use the WebLogic Server *"
  156.  
  157. echo "* console at http://hostname:port/console *"
  158.  
  159. echo "***************************************************"
  160.  
  161. # CLASS CACHING
  162.  
  163. if [ "${CLASS_CACHE}" = "true" ] ; then
  164. classCaching
  165. fi
  166.  
  167. # START WEBLOGIC
  168.  
  169. echo "starting weblogic with Java version:"
  170.  
  171. ${JAVA_HOME}/bin/java ${JAVA_VM} -version
  172.  
  173. if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
  174. echo "Starting WLS with line:"
  175. echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}"
  176. ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
  177. else
  178. echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
  179. ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
  180. fi
  181.  
  182. stopAll
  183.  
  184. popd
  185.  
  186. # Exit this script only if we have been told to exit.
  187.  
  188. if [ "${doExitFlag}" = "true" ] ; then
  189. exit
  190. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement