### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.services.dstore Index: serverruntime/scripts/unix/server.sh =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh,v retrieving revision 1.6 diff -u -r1.6 server.sh --- serverruntime/scripts/unix/server.sh 3 Mar 2008 15:59:45 -0000 1.6 +++ serverruntime/scripts/unix/server.sh 4 Mar 2008 15:44:54 -0000 @@ -1,6 +1,6 @@ #!/bin/sh #******************************************************************************* -# Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others. +# Copyright (c) 2005, 2008 IBM Corporation, Wind River Systems, Inc. and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -10,13 +10,42 @@ # IBM Corporation - initial API and implementation # Martin Oberhuber (Wind River) - Fix for solaris (Bourne Shell export statement) # Patrick Juhl - Fix for unix (Parameters for port selection) +# David McKnight (IBM) - Fix to handle timeout and clientUserID parameters #******************************************************************************* # Shell script to start an RSE communications server # This script will start the datastore server listening on an available socket serverpath=.; + CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH; export serverpath CLASSPATH -if [ $1 ] -then java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$1 -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $1 & -else java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 & + +if [ $# -gt 3 ] +then + echo "command usage:" + echo "server.sh [] [] []" + exit fi + +port=0; +timeout=60000; +clientUserID=$USER; + +if [ $# -eq 3 ] +then + port=$1 + timeout=$2 + clientUserID=$3 +fi + +if [ $# -eq 2 ] +then + port=$1 + timeout=$2 +fi + +if [ $# -eq 1 ] +then port=$1 +fi + +java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$clientUserID -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout & +