Weblogic上部署项目可以部署在admin上也可以部署在domain上。

对于部署在admin上的项目,远程调试需要打开debug开关,即编辑start_admin.sh(admin/server/bin/),增加下面红色部分代码。


SERVER_NAME="ADMIN"
echo  ${JAVA_OPTIONS}

JAVA_DEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=7014,server=y,suspend=n"
export JAVA_DEBUG

if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
  echo "Starting WLS with line:" >> ${LOG_FILE_NEW}
  echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy  -Djava
.security.egd=file:///dev/urandom ${PROXY_SETTINGS} ${SERVER_CLASS}" >> ${LOG_FILE_NEW}
 nohup ${JAVA_HOME}/bin/java ${JAVA_VM} ${JAVA_DEBUG} ${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy -Djava.security.egd=file:///dev/urandom ${PROXY_SETTINGS} ${SERVER_CLASS} >> ${LOG_FILE_NEW} 2>&1 &else echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}" >> ${LOG_FILE_NEW} ${JAVA_HOME}/bin/java ${JAVA_VM}${JAVA_DEBUG} ${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy -Djava.security.egd=file:///dev/urandom ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1fi


对于部署在domain里的代码,需要编辑startWebLogic.sh(admin/server/domain/bin/),同样增加下面红色部分代码。

${JAVA_HOME}/bin/java ${JAVA_VM} -version
JAVA_DEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=7014,server=y,suspend=n"
export JAVA_DEBUG
if [ "${WLS_REDIRECT_LOG}" = "" ] ; then echo "Starting WLS with line:" echo "${JAVA_HOME}/bin/java ${JAVA_VM}${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy${PROXY_SETTINGS} ${SERVER_CLASS}" ${JAVA_HOME}/bin/java ${JAVA_VM}${JAVA_DEBUG}${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${PROXY
_SETTINGS} ${SERVER_CLASS}else echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}" ${JAVA_HOME}/bin/java ${JAVA_VM}${JAVA_DEBUG}${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${PROXY
_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1f



Logo

更多推荐