
weblogic定时重启的总结.pdf
5页首先感谢一位我不认识的北京的姓王的大哥,没有他没有这篇总结. Weblogic 定时启动, 首先需要注册 Windows 的一个服务, 这里需要一个文件 installServer.cmd 或 者installSvc.cmd , 需 要 放 到 自 己 创 建 的Domain下 面 ( 我 的 是 D:\WebLogic\user_projects\domains\my_domain),下面是这个文件的内容: @rem ************************************************************************* @rem This script is used to install WebLogic Server as a Windows Service. @rem @rem To create your own start script for your domain, simply set the @rem SERVER_NAME variable to your server name then call this script from your @rem domain directory. @rem @rem This script sets the following variables before installing @rem WebLogic Server as a Windows Service: @rem @rem WL_HOME - The root directory of your WebLogic installation @rem JAVA_HOME - Location of the version of Java used to start WebLogic @rem Server. This variable must point to the root directory of a @rem JDK installation and will be set for you by the installer. @rem See the WebLogic platform support page @rem (http://e- for an up-to-date list of @rem supported JVMs on Windows NT. @rem PATH - Adds the JDK and WebLogic directories to the system path. @rem CLASSPATH - Adds the JDK and WebLogic jars to the classpath. @rem @rem Other variables that installSvc takes are: @rem @rem WLS_USER - admin username for server startup @rem WLS_PW - cleartext password for server startup @rem ADMIN_URL - if this variable is set, the server started will be a @rem managed server, and will look to the url specified (i.e. @rem http://localhost:7001) as the admin server. @rem PRODUCTION_MODE - set to true for production mode servers, false for @rem development mode @rem JAVA_OPTIONS - Java command-line options for running the server. (These @rem will be tagged on to the end of the JAVA_VM and MEM_ARGS) @rem JAVA_VM - The java arg specifying the VM to run. (i.e. -server, @rem -client, etc.) @rem MEM_ARGS - The variable to override the standard memory arguments @rem passed to java @rem @rem jDriver for Oracle users: This script assumes that native libraries @rem required for jDriver for Oracle have been installed in the proper @rem location and that your system PATH variable has been set appropriately. @rem @rem For additional information, refer to the WebLogic Server Administration @rem Guide (@DOCSWEBROOT/adminguide/startstop.html). @rem ************************************************************************* @echo off SETLOCAL @rem 注释 1:(红色部分是根据自身情况需要您修改的) set WL_HOME=D:\WebLogic\weblogic92 call “%WL_HOME%\common\bin\commEnv.cmd“ @rem Set JAVA_VENDOR to java virtual machine you want to run on server side. set JAVA_VENDOR=BEA @rem Set JAVA_HOME to java virtual machine you want to run on server side. set JAVA_HOME=D:\WebLogic\jrockit90_150_04 @rem USERDOMAIN_HOME is preset to the domain directory. set USERDOMAIN_HOME=D:\WebLogic\user_projects\domains\my_domain @rem Set SERVER_NAME to the name of the server you wish to start up. set SERVER_NAME=AdminServer @rem Set DOMAIN_NAME to the name of the server you wish to start up. set DOMAIN_NAME=my_domain @rem Set WLS_USER equal to your system username and WLS_PW equal @rem to your system password for no username and password prompt @rem during server startup. Both are required to bypass the startup @rem prompt. set WLS_USER=weblogic set WLS_PW=weblogic @rem Check that the WebLogic classes are where we expect them to be :checkWLS if exist “%WL_HOME%\server\lib\weblogic.jar“ goto checkJava echo The WebLogic Server wasn't found in directory %WL_HOME%\server. echo Please edit your script so that the WL_HOME variable points echo to the WebLogic installation directory. goto finish @rem Check that java is where we expect it to be :checkJava if exist “%JAVA_HOME%\bin\java.exe“ goto runWebLogic echo The JDK wasn't found in directory %JAVA_HOME%. echo Please edit your script so that the JAVA_HOME variable echo points to the location of your JDK. goto finish :runWebLogic if not “%JAVA_VM%“ == ““ goto noResetJavaVM if “%JAVA_VENDOR%“ == “BEA“ set JAVA_VM=-jrocket if “%JAVA_VENDOR%“ == “HP“ set JAVA_VM=-server if “%JAVA_VENDOR%“ == “Sun“ set JAVA_VM=-server :noResetJavaVM if not “%MEM_ARGS%“ == ““ goto noResetMemArgs set MEM_ARGS=-Xms32m -Xmx200m :noResetMemArgs @echo on set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH% @echo *************************************************** @echo * To start WebLogic Server, use the password * @echo * assigned to the system user. The system * @echo * username and password must also be used to * @echo * access the WebLogic Server console from a web * @echo * browser. * @echo *************************************************** rem *** Set Command Line fo。
