diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/CHANGES | 3 | ||||
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 3 | ||||
-rw-r--r-- | cpp/test/Ice/operations/BatchOneways.cpp | 32 |
3 files changed, 6 insertions, 32 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES index 1529179fb43..e675faa6fdd 100644 --- a/cpp/CHANGES +++ b/cpp/CHANGES @@ -34,7 +34,8 @@ Changes since version 3.1.1 for details. - Message batches are now automatically flushed when the total size of - the batch reaches the message size maximum. + the batch reaches the message size maximum. This feature can be controlled + using the Ice.BatchAutoFlush property, which is on by default. - It's now possible to specify logs file for IceGrid servers with the `log' XML element of a server descriptor. Server logs can diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index 4fa3c4fe8bd..13d107d238e 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -1589,7 +1589,8 @@ Ice::ConnectionI::ConnectionI(const InstancePtr& instance, _nextRequestId(1), _requestsHint(_requests.end()), _asyncRequestsHint(_asyncRequests.end()), - _batchAutoFlush(_instance->initializationData().properties->getPropertyAsInt("Ice.BatchAutoFlush") > 0), + _batchAutoFlush( + _instance->initializationData().properties->getPropertyAsIntWithDefault("Ice.BatchAutoFlush", 1) > 0), _batchStream(_instance.get(), _batchAutoFlush), _batchStreamInUse(false), _batchRequestNum(0), diff --git a/cpp/test/Ice/operations/BatchOneways.cpp b/cpp/test/Ice/operations/BatchOneways.cpp index d45aeb5c482..0556e8bb722 100644 --- a/cpp/test/Ice/operations/BatchOneways.cpp +++ b/cpp/test/Ice/operations/BatchOneways.cpp @@ -54,7 +54,7 @@ batchOneways(const Test::MyClassPrx& p) int i; - for(i = 0 ; i < 9 ; ++i) + for(i = 0 ; i < 30 ; ++i) { try { @@ -65,35 +65,7 @@ batchOneways(const Test::MyClassPrx& p) { test(false); } - - batch->ice_getConnection()->flushBatchRequests(); } - for(i = 0 ; i < 10 ; ++i) - { - try - { - batch->opByteSOneway(bs1); - test(i < 9); - } - catch(const Ice::MemoryLimitException&) - { - test(i == 9); - } - } - - for(i = 0 ; i < 9 ; ++i) - { - try - { - batch->opByteSOneway(bs1); - test(true); - } - catch(const Ice::MemoryLimitException&) - { - test(false); - } - - batch->ice_getConnection()->flushBatchRequests(); - } + batch->ice_getConnection()->flushBatchRequests(); } |