chkpid=`ps -ef | grep [H]NWFileAnalysis | wc -l`
if [ $chkpid -gt 0 ] ; then
./stopHNWFileAnalysis.sh
fi
if [ -z "$JAVA_HOME" ] ; then
`grep export setenv-java.sh`
fi
BASEDIR=`dirname $0`/..
BASEDIR=`(cd "$BASEDIR"; pwd)`
datetime() { echo "`date +%Y-%m-%d.%H:%M`"; }
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
Darwin*) darwin=true
if [ -z "$JAVA_VERSION" ] ; then
JAVA_VERSION="CurrentJDK"
else
echo "Using Java version: $JAVA_VERSION"
fi
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# If a specific java binary isn't specified search for the standard 'java' binary
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD=`which java`
fi
fi
#if [ ! -x "$JAVACMD" ] ; then
# echo "Error: JAVA_HOME is not defined correctly."
# echo " We cannot execute $JAVACMD"
# exit 1
#fi
if [ -z "$REPO" ]
then
REPO="$BASEDIR"/lib
fi
CLASSPATH=$CLASSPATH_PREFIX:"$BASEDIR"/conf:"$REPO"/jconnect-2.jar:"$REPO"/commons-pool-1.5.4.jar:"$REPO"/commons-dbcp-1.4.jar:"$REPO"/jconn3-6.0.jar:"$REPO"/spring-2.5.6.jar:"$REPO"/commons-dbcp-1.4.jar:"$REPO"/gateway-1.0_A8.jar:"$REPO"/commons-cli-1.2.jar:"$REPO"/aspen-rmiclient-1.1_B1.jar:"$REPO"/spring-1.0_A0.jar:"$REPO"/com.springsource.org.aopalliance-1.0.0.jar:"$REPO"/camel-spring-2.7.2.jar:"$REPO"/spring-context-3.0.5.RELEASE.jar:"$REPO"/spring-expression-3.0.5.RELEASE.jar:"$REPO"/spring-asm-3.0.5.RELEASE.jar:"$REPO"/spring-aop-3.0.5.RELEASE.jar:"$REPO"/aopalliance-1.0.jar:"$REPO"/spring-tx-3.0.5.RELEASE.jar:"$REPO"/camel-jaxb-2.7.2.jar:"$REPO"/jaxb-api-2.1.jar:"$REPO"/camel-jms-2.7.2.jar:"$REPO"/spring-jms-3.0.5.RELEASE.jar:"$REPO"/spring-core-3.0.5.RELEASE.jar:"$REPO"/spring-beans-3.0.5.RELEASE.jar:"$REPO"/camel-quartz-2.7.2.jar:"$REPO"/quartz-1.8.4.jar:"$REPO"/jta-1.1.jar:"$REPO"/commons-collections-3.2.1.jar:"$REPO"/camel-netty-2.7.2.jar:"$REPO"/org.apache.servicemix.bundles.netty-3.2.3.Final_1.jar:"$REPO"/spring-test-3.0.5.RELEASE.jar:"$REPO"/slf4j-log4j12-1.6.1.jar:"$REPO"/slf4j-api-1.6.1.jar:"$REPO"/log4j-1.2.16.jar:"$REPO"/junit-4.8.2.jar:"$REPO"/commons-io-1.4.jar:"$REPO"/commons-codec-1.5.jar:"$REPO"/commons-httpclient-2.0.2.jar:"$REPO"/commons-logging-1.1.1.jar:"$REPO"/commons-lang-2.6.jar:"$REPO"/mirrorlake-1.0_A8.jar:"$REPO"/mirrorlake-rmiclient-2.0_D0.jar:"$REPO"/gfinet_config_all-3.1_G0.jar:"$REPO"/tibjms-5.1.5l.jar:"$REPO"/wlfullclient6-10.3.jar:"$REPO"/dsp4-1.0_A8.jar:"$REPO"/dsp_client-1.2_C0.jar:"$REPO"/dsp_gemfire-1.2_C0.jar:"$REPO"/dsp_common-1.2_C0.jar:"$REPO"/gemfire-6.5.jar:"$REPO"/gfinet_messaging-2.2_D3.jar:"$REPO"/gfinet_config-3.1_G0.jar:"$REPO"/gficore_all-12.4_Y0.jar:"$REPO"/jms-4.4.3l.jar:"$REPO"/camel-core-2.8.6.jar:"$REPO"/commons-management-1.0.jar:"$REPO"/dspModelClient-1.21_V0.jar:"$REPO"/camel-ahc-2.8.6.jar:"$REPO"/async-http-client-1.6.5.jar:"$REPO"/netty-3.2.5.Final.jar:"$REPO"/ojdbc6-11g.jar:"$REPO"/commons-httpclient-3.1_1.jar:"$REPO"/gxs-1.0_A8.jar:"$REPO"/jibx-run-1.2.1.jar:"$REPO"/wstx-asl-3.2.1.jar:"$REPO"/stax-api-1.0.1.jar:"$REPO"/jibx-extras-1.2.1.jar:"$REPO"/gxServiceClient-1.0_A4_2.jar:"$REPO"/jaxws-rt-2.2.7.jar:"$REPO"/jaxws-api-2.2.8.jar:"$REPO"/saaj-api-1.3.4.jar:"$REPO"/javax.annotation-3.1.1.jar:"$REPO"/jsr181-api-1.0-MR1.jar:"$REPO"/jaxb-impl-2.2.6.jar:"$REPO"/saaj-impl-1.3.19.jar:"$REPO"/streambuffer-1.5.jar:"$REPO"/stax-api-1.0-2.jar:"$REPO"/activation-1.1.jar:"$REPO"/woodstox-core-asl-4.1.2.jar:"$REPO"/stax2-api-3.1.1.jar:"$REPO"/mimepull-1.8.jar:"$REPO"/policy-2.3.1.jar:"$REPO"/txw2-20110809.jar:"$REPO"/relaxngDatatype-20020414.jar:"$REPO"/istack-commons-runtime-2.4.jar:"$REPO"/stax-ex-1.7.jar:"$REPO"/gmbal-api-only-3.1.0-b001.jar:"$REPO"/management-api-3.0.0-b012.jar:"$REPO"/ha-api-3.1.8.jar:"$REPO"/restclient-2.3.jar:"$REPO"/httpclient-4.1.1.jar:"$REPO"/httpcore-4.1.jar:"$REPO"/jetty-6.0.2.jar:"$REPO"/camel-jetty-2.7.2.jar:"$REPO"/camel-http-2.7.2.jar:"$REPO"/geronimo-servlet_2.4_spec-1.1.1.jar:"$REPO"/jetty-server-7.2.2.v20101205.jar:"$REPO"/servlet-api-2.5.jar:"$REPO"/jetty-continuation-7.2.2.v20101205.jar:"$REPO"/jetty-http-7.2.2.v20101205.jar:"$REPO"/jetty-io-7.2.2.v20101205.jar:"$REPO"/jetty-security-7.2.2.v20101205.jar:"$REPO"/jetty-servlet-7.2.2.v20101205.jar:"$REPO"/jetty-servlets-7.2.2.v20101205.jar:"$REPO"/jetty-util-7.2.2.v20101205.jar:"$REPO"/jetty-client-7.2.2.v20101205.jar:"$REPO"/jetty-jmx-7.2.2.v20101205.jar:"$REPO"/jetty-webapp-7.2.2.v20101205.jar:"$REPO"/jetty-xml-7.2.2.v20101205.jar:"$REPO"/maven-rpm-plugin-1.0.jar:"$REPO"/HNWFileAnalysis-1.0_A1.jar
EXTRA_JVM_ARGUMENTS="-XX:+ScavengeBeforeFullGC -Xms256m -Xmx2048m -Dlog.prefix=mlsub -Dml.env=UAT -XX:PermSize=64m -XX:MaxPermSize=256m -Dcom.sun.management.jmxremote.port=9998 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
export JAVA_HOME=/export/opt/jrockit/6.0_14R27.6.5l64
JAVACMD=$JAVA_HOME/bin/java
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
[ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
[ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
fi
export BASEDIR=/opt/HNW/HNWFileAnalysis/1.0_A1
export JAVA_OPTS="-server"
nohup "$JAVACMD" $JAVA_OPTS \
$EXTRA_JVM_ARGUMENTS \
-classpath "$CLASSPATH" \
-Dapp.name="HNWFileAnalysis" \
-Dapp.pid="$$" \
-Dapp.repo="$REPO" \
-Dbasedir="$BASEDIR" \
gravity.framework.core.ApplicationContextGateway conf/hnw_file_feed.xml \
>> /opt/HNW/HNWFileAnalysis/logs/hnw.log.`datetime`.$$ &
JAVAPID=`echo $!`
echo Process ID: $JAVAPID.
export LOGDIR=/opt/HNW/HNWFileAnalysis/logs
rm -f $LOGDIR/hnw.log
ln -s $LOGDIR/hnw.log.`datetime`.$$ $LOGDIR/hnw.log