#!/bin/sh # **************************************************************************** # This script is used to start a managed WebLogic Server for the domain in the # current working directory. This script reads in the SERVER_NAME and # ADMIN_URL as positional parameters, sets the SERVER_NAME variable, then # starts the server. # # Other variables that startWLS takes are: # # WLS_USER - cleartext user for server startup # WLS_PW - cleartext password for server startup # PRODUCTION_MODE - Set to true for production mode servers, false for # development mode # JAVA_OPTIONS - Java command-line options for running the server. (These # will be tagged on to the end of the JAVA_VM and MEM_ARGS) # JAVA_VM - The java arg specifying the VM to run. (i.e. -server, # -hotspot, etc.) # MEM_ARGS - The variable to override the standard memory arguments # passed to java # # For additional information, refer to the WebLogic Server Administration Guide # (/ConsoleHelp/startstop.html). # **************************************************************************** # set up WL_HOME, the root directory of your WebLogic installation WL_HOME="/product/bea/wlserver_10.3" # set up common environment # Set Production Mode. When this is set to true, the server starts up in # production mode. When set to false, the server starts up in development # mode. If it is not set, it will default to false. PRODUCTION_MODE="true" export PRODUCTION_MODE # Set JAVA_VENDOR to java virtual machine you want to run on server side. #JAVA_VENDOR="IBM" # Set JAVA_HOME to java virtual machine you want to run on server side. JAVA_HOME="/usr/java6/jdk1.6.0_45" #. "${WL_HOME}/common/bin/commEnv.sh" # Set SERVER_NAME to the name of the server you wish to start up. ADMIN_URL="https://10.50.46.84:7002" SERVER_NAME="dbcfxserver2" export SERVER_NAME # Set JAVA_VM to java virtual machine you want to run on server side. # JAVA_VM="-server" # Set JAVA_OPTIONS to the java flags you want to pass to the vm. If there # are more than one, include quotes around them. For instance: # JAVA_OPTIONS="-Dweblogic.attribute=value -Djava.attribute=value" usage() { echo "Need to set SERVER_NAME and ADMIN_URL environment variables or specify" echo "them in command line:" echo 'Usage: ./startManagedWebLogic.sh [SERVER_NAME] [ADMIN_URL]' echo "for example:" echo './startManagedWebLogic.sh managedserver2 https://10.50.46.84:7002' exit 1 } #gnp settings begin THIS_PATH=`dirname $0` . /gnpapp/script/setEnv.sh USER_MEM_ARGS="-Xms1024m -Xmx1524m -XX:MaxPermSize=512m" export USER_MEM_ARGS # includo patch bea x code JMS prima di weblogic.jar CLASSPATH="${IB_CLASSPATH}:${JNI_BRIDGE_CLASSPATH}:${WEBLOGIC_CLASSPATH}:${JAVA_HOME}/jre/lib/rt.jar:${WL_HOME}/server/lib/webservices.jar::${CLASSPATH}" export CLASSPATH #log file NOW=$(date '+%Y%m%d%H%M%S') mv ${GNP_LOG_DBCFXSERVER2_FILE} ${GNP_LOG_DBCFXSERVER2_FILE}.$NOW #getting admin url while getopts a: OPT do case $OPT in a) ADMIN_URL="$OPTARG";; ?) echo "Usage: startDBCFXManagedWebLogic1.sh [-a admin-url]" echo "Example: startDBCFXManagedWebLogic1.sh -a https://10.50.46.84:7002" exit ;; esac done echo "admin url --> $ADMIN_URL" JAVA_OPTIONS= #JAVA_OPTIONS="-Dweblogic.Name="${SERVER_NAME}" ${JAVA_OPTIONS} " JAVA_OPTIONS="-Dweblogic.management.server="${ADMIN_URL}" ${JAVA_OPTIONS} " #JAVA_OPTIONS="-Djava.security.policy="${WL_HOME}/server/lib/weblogic.policy" ${JAVA_OPTIONS} " JAVA_OPTIONS="-Dweblogic.system.BootIdentityFile="${THIS_PATH}/BootIdentity.properties" ${JAVA_OPTIONS} " #JAVA_OPTIONS="-Dweblogic.ProductionModeEnabled="${PRODUCTION_MODE}" ${JAVA_OPTIONS} " JAVA_OPTIONS="-Dsecurity_conf_file="${GNP_SECURITY_PROP_FILE}" ${JAVA_OPTIONS} " JAVA_OPTIONS="-Dgnp_path_properties="${GNP_PROP_FILE}" ${JAVA_OPTIONS} " JAVA_OPTIONS="-Dcrontab_path_properties="${CRONTAB_PROP_FILE}" ${JAVA_OPTIONS} " JAVA_OPTIONS="-Dweblogic.security.SSL.ignoreHostnameVerification=true ${JAVA_OPTIONS} " JAVA_OPTIONS="-Dweblogic.security.SSL.trustedCAKeyStore=/gnpapp/cert/dbcfxCAkeystore ${JAVA_OPTIONS} " JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom ${JAVA_OPTIONS}" # puntamento alla libreria i686 per escludere gli errori su wlfileio su JMS persistent store JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.library.path=/product/bea/wlserver_10.3/server/native/linux/i686" # Inserita la seguente per problema comunicazione con il sistema NOW JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.security.SSL.minimumProtocolVersion=SSLv3" #gnp settings end # Start WebLogic server echo "Starting dbcfxserver2@GNP ..." echo echo CLASSPATH="${CLASSPATH}" echo echo PATH="${PATH}" echo echo JAVA_OPTIONS="${JAVA_OPTIONS}" echo GNP_LOG_DBCFXSERVER2_FILE="${GNP_LOG_DBCFXSERVER2_FILE}" echo nohup ${DOMAIN_HOME}/bin/startWebLogic.sh $* >> ${GNP_LOG_DBCFXSERVER2_FILE} 2>&1 &