1
1
#! /bin/bash
2
+ #
3
+ # ./startSmalltalkServer31 runs a server Gem
4
+ # - first argument is the name of the server class that will be looked up in Gemstone to startthe server
5
+ # - second argument is a port number
6
+ #
7
+ ServerClass=$1
8
+ ServerPort=$2
9
+
2
10
3
11
if [ -s $GEMSTONE /seaside/etc/gemstone.secret ]; then
4
12
. $GEMSTONE /seaside/etc/gemstone.secret
@@ -13,7 +21,13 @@ if [ "a$1" = "a" ]; then
13
21
exit 1
14
22
fi
15
23
16
- cat << EOF | nohup $GEMSTONE /bin/topaz -l -T50000 2>&1 >> $GEMSTONE_LOGDIR /${1} _server-${2} .log &
24
+ # Requires a port number as a parameter
25
+ if [ " a$2 " = " a" ]; then
26
+ echo ' Missing argument <server port number>'
27
+ exit 1
28
+ fi
29
+
30
+ cat << EOF | nohup $GEMSTONE /bin/topaz -l -e $GEMSTONE /seaside/etc/seaside30.conf 2>&1 >> $GEMSTONE_LOGDIR /${1} _server-${2} .log &
17
31
18
32
set user DataCurator pass $GEMSTONE_CURATOR_PASS gems $GEMSTONE_NAME
19
33
@@ -40,21 +54,24 @@ System commitTransaction
40
54
%
41
55
42
56
run
43
- | count |
44
- true "enable for remote breakpoints and profiling"
57
+ | x |
58
+ "set _cacheName: for Gem to get unique id in statmon output. see http://code.google.com/p/glassdb/issues/detail?id=132"
59
+ System _cacheName: ((x := '$1 -' , (GsSession serialOfSession: System session) printString , '-' , System myUserProfile userId) copyFrom: 1 to: (x size min: 31)).
60
+ %
61
+
62
+ run
63
+
64
+ GsProcess usingNativeCode not
45
65
ifTrue: [
66
+ "Enable remote Breakpoing handling"
67
+ Breakpoint trappable: true.
46
68
GemToGemAnnouncement installStaticHandler.
47
- Exception
48
- installStaticException:
49
- [:ex :cat :num :args |
50
- BreakpointNotification signal.
51
- "needed to avoid infinite loop when resuming from a breakpoint"
52
- ex _incrementBreakpointsToIgnore. ]
53
- category: GemStoneError
54
- number: 6005 "#rtErrCodeBreakpoint"
55
- subtype: nil.
56
- System commitTransaction ifFalse: [ nil error: 'Could not commit for GemToGemSignaling' ]].
57
- "System transactionMode: #manualBegin."
69
+ System commitTransaction
70
+ ifFalse: [ nil error: 'Could not commit for GemToGemSignaling' ].
71
+ ].
72
+
73
+ System transactionMode: #manualBegin.
74
+
58
75
Exception
59
76
installStaticException:
60
77
[:ex :cat :num :args |
@@ -78,11 +95,15 @@ System enableSignaledAbortError.
78
95
[ true ] whileTrue: [ (Delay forSeconds: 30) wait ].
79
96
] forkAt: Processor lowestPriority.
80
97
98
+ GsFile gciLogServer: '$1 Server started on port ', $2 printString.
99
+
81
100
WAGemStoneRunSmalltalkServer startGemServer: '$1 ' On: $2 .
101
+ "does not return"
82
102
%
83
103
run
84
104
GemToGemAnnouncement uninstallStaticHandler.
85
- System beginTransaction.
105
+ System inTransaction
106
+ ifFalse: [ System beginTransaction ].
86
107
(ObjectLogEntry
87
108
fatal: '${1} _server_${2} : topaz exit'
88
109
object:
0 commit comments