View | Details | Raw Unified | Return to bug 164300 | Differences between
and this patch

Collapse All | Expand All

(-)serverruntime/scripts/unix/server.sh (-4 / +33 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#*******************************************************************************
2
#*******************************************************************************
3
# Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others.
3
# Copyright (c) 2005, 2008 IBM Corporation, Wind River Systems, Inc. and others.
4
# All rights reserved. This program and the accompanying materials
4
# All rights reserved. This program and the accompanying materials
5
# are made available under the terms of the Eclipse Public License v1.0
5
# are made available under the terms of the Eclipse Public License v1.0
6
# which accompanies this distribution, and is available at
6
# which accompanies this distribution, and is available at
Lines 10-22 Link Here
10
# IBM Corporation - initial API and implementation
10
# IBM Corporation - initial API and implementation
11
# Martin Oberhuber (Wind River) - Fix for solaris (Bourne Shell export statement)
11
# Martin Oberhuber (Wind River) - Fix for solaris (Bourne Shell export statement)
12
# Patrick Juhl - Fix for unix (Parameters for port selection)
12
# Patrick Juhl - Fix for unix (Parameters for port selection)
13
# David McKnight (IBM) - Fix to handle timeout and clientUserID parameters
13
#*******************************************************************************
14
#*******************************************************************************
14
# Shell script to start an RSE communications server
15
# Shell script to start an RSE communications server
15
# This script will start the datastore server listening on an available socket
16
# This script will start the datastore server listening on an available socket
16
serverpath=.;
17
serverpath=.;
18
17
CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH;
19
CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH;
18
export serverpath CLASSPATH
20
export serverpath CLASSPATH
19
if [ $1 ]                     
21
20
then java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$1 -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $1 &
22
if [ $# -gt 3 ]
21
else java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 &
23
then 
24
   echo "command usage:"
25
   echo "server.sh [<port>] [<timeout>] [<clientUserID>]"   
26
   exit
22
fi
27
fi
28
29
port=0;
30
timeout=60000;
31
clientUserID=$USER;
32
33
if [ $# -eq 3 ]
34
then
35
  port=$1
36
  timeout=$2
37
  clientUserID=$3
38
fi
39
40
if [ $# -eq 2 ]
41
then 
42
  port=$1
43
  timeout=$2
44
fi
45
46
if [ $# -eq 1 ]
47
then port=$1
48
fi
49
50
java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$clientUserID -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout &
51

Return to bug 164300