#!/bin/bash
# IBM Confidential
# OCO Source Materials
# 5724-V51
#
# (c) Copyright IBM Corp. 2000, 2008 All Rights Reserved.
#
# The source code for this program is not published or otherwise
# divested of its trade secrets, irrespective of what has been
# deposited with the U.S. Copyright Office.
# 
# # Copyright (c) 2000, 2004 IBM Corp. - All Rights Reserved.
# # IBM makes no representations or warranties about the suitability of
# # this program, either express or implied, including but not limited to
# # the implied warranties of merchantability, fitness for a particular
# # purpose, or non-infringement. 
# 
#


. ${TOP}/bin/get_params.sh
SVC_NAME=${_CCD_SVC_NAME=queuemanager_${SHORT_HOSTNAME}}
. ${ADMIN_DIR}/init_svc_vars.sh

if [ ! "${_CCD_STOP}" = "no" ]; then
    ${ADMIN_DIR}/abort/abort_queuemanager.sh --svc_name=${SVC_NAME}
fi

CheckDbSchemaVersion
if [ "$?" -eq "1" ]
then
	exit 1
fi

${ECHO} "starting service '${SVC_NAME}'"

# The following script checks if trace is enabled and sets the tracing aspect jar in classpath
. ${TOP}/bin/check_trace.sh

startWithLogs ${JAVA_RT_HOTSPOT} ${QUEUEMANAGER_MEMORY_FLAG} ${CCD_QUEUEMANAGER_JVM_DEBUG_OPTS} ${CCD_QUEUEMANAGER_JVM_PROFILING_AGENT} -Dsvc_name=${SVC_NAME} -Dprofiler_opts=${CCD_QUEUEMANAGER_PROFILER_NAME}__${CCD_QUEUEMANAGER_PROFILER_PORT} com.ibm.ccd.connectivity.common.QueueService
