Skip to content

Commit f784fc4

Browse files
authored
Merge pull request #100 from pdebruic/gs_master
changes to be able to use streaming with seaside
2 parents bbb6964 + ef77e82 commit f784fc4

File tree

12 files changed

+43
-13
lines changed

12 files changed

+43
-13
lines changed

repository/Zinc-GemStone-Server-Tools.package/ZnGemServerManagingMultiThreadedServer.class/instance/writeResponse.on..st

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ request handling
22
writeResponse: response on: streamTransientStackValue
33
"Write response to stream and flush the stream"
44

5-
response writeOn: streamTransientStackValue value.
5+
response isStreamingResponse
6+
ifTrue: [ self write: response duringTransactionOn: streamTransientStackValue value ]
7+
ifFalse: [ response writeOn: streamTransientStackValue value ].
68
streamTransientStackValue value flush.
79
self logResponse: response

repository/Zinc-GemStone-Server-Tools.package/ZnGemServerManagingMultiThreadedServer.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"socketStreamOn:" : "dkh 01/07/2015 16:40",
2626
"start" : "dkh 01/07/2015 17:46",
2727
"stop:" : "dkh 01/07/2015 17:49",
28-
"writeResponse:on:" : "dkh 01/07/2015 16:40",
28+
"writeResponse:on:" : "PaulDeBruicker 06/28/2022 14:26",
2929
"writeResponseBad:on:" : "dkh 01/08/2015 17:03",
3030
"writeResponseSafely:on:" : "dkh 01/07/2015 18:29" } }

repository/Zinc-GemStone-Server-Tools.package/monticello.meta/version

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*zinc-http
2+
isStreamingResponse
3+
^ false

repository/Zinc-HTTP.package/Object.extension/methodProperties.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
"class" : {
33
},
44
"instance" : {
5-
"deprecated:on:in:" : "SvenVanCaekenberghe 07/20/2012 01:11:50" } }
5+
"deprecated:on:in:" : "SvenVanCaekenberghe 07/20/2012 01:11:50",
6+
"isStreamingResponse" : "PaulDeBruicker 06/24/2022 16:43" } }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
request handling
2+
write: response duringTransactionOn: stream
3+
| commitResult |
4+
System inTransaction
5+
ifTrue: [
6+
"We already are in a transaction, so just write the response"
7+
response writeOn: stream.
8+
^ true ]
9+
ifFalse: [
10+
[
11+
System beginTransaction.
12+
response writeOn: stream ]
13+
ensure: [
14+
"workaround for Bug 42963: ensure: block executed twice (don't return from ensure: block)"
15+
commitResult := System commitTransaction ] ].
16+
^ commitResult
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
request handling
22
writeResponse: response on: stream
3-
"Write response to stream and flush the stream"
4-
5-
response writeOn: stream.
6-
stream flush.
7-
self logResponse: response
3+
"Write response to stream and flush the stream"
4+
5+
response isStreamingResponse
6+
ifTrue: [ self write: response duringTransactionOn: stream ]
7+
ifFalse: [ response writeOn: stream ].
8+
stream flush.
9+
self logResponse: response

repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/methodProperties.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,5 @@
4646
"stop:" : "dkh 12/06/2014 15:00",
4747
"stopLogging" : "SvenVanCaekenberghe 10/4/2011 12:35",
4848
"withMaximumEntitySizeDo:" : "SvenVanCaekenberghe 9/5/2012 12:49",
49-
"writeResponse:on:" : "SvenVanCaekenberghe 12/14/2010 14:37" } }
49+
"write:duringTransactionOn:" : "PaulDeBruicker 06/28/2022 14:25",
50+
"writeResponse:on:" : "PaulDeBruicker 06/28/2022 14:22" } }

repository/Zinc-HTTP.package/ZnTransactionSafeManagingMultiThreadedServer.class/instance/writeResponse.on..st

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ request handling
22
writeResponse: response on: streamTransientStackValue
33
"Write response to stream and flush the stream"
44

5-
response writeOn: streamTransientStackValue value.
5+
response isStreamingResponse
6+
ifTrue: [
7+
GRPlatform current
8+
doTransaction: [ response writeOn: streamTransientStackValue value ] ]
9+
ifFalse: [ response writeOn: streamTransientStackValue value ].
610
streamTransientStackValue value flush.
711
self logResponse: response

repository/Zinc-HTTP.package/ZnTransactionSafeManagingMultiThreadedServer.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
"serverSocket" : "dkh 12/08/2014 15:51",
1818
"socketStreamOn:" : "dkh 12/08/2014 15:21",
1919
"stop:" : "dkh 12/08/2014 15:21",
20-
"writeResponse:on:" : "dkh 12/08/2014 16:01",
20+
"writeResponse:on:" : "PaulDeBruicker 06/24/2022 16:25",
2121
"writeResponseSafely:on:" : "dkh 12/08/2014 15:58" } }

repository/Zinc-HTTP.package/monticello.meta/version

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

workspace.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Metacello image
1414
baseline: #('ZincHTTPComponents');
1515
silently;
1616
get.
17+
1718
Metacello image
1819
baseline: #('ZincHTTPComponents');
1920
silently;

0 commit comments

Comments
 (0)