summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/Reference.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-08-09 13:40:23 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-08-09 13:40:23 +0000
commit59c9266de0199fceec156982e4e4ba548c526f54 (patch)
tree7afddb90d14741a8a699e3c85bb66c0f6b7160ca /cppe/src/IceE/Reference.cpp
parent- Fix connection string in TcpConnector. (diff)
downloadice-59c9266de0199fceec156982e4e4ba548c526f54.tar.bz2
ice-59c9266de0199fceec156982e4e4ba548c526f54.tar.xz
ice-59c9266de0199fceec156982e4e4ba548c526f54.zip
Trying to call batch oneway with batch disabled now throws exception
Diffstat (limited to 'cppe/src/IceE/Reference.cpp')
-rw-r--r--cppe/src/IceE/Reference.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/cppe/src/IceE/Reference.cpp b/cppe/src/IceE/Reference.cpp
index 72935b41b8f..5250e2fb502 100644
--- a/cppe/src/IceE/Reference.cpp
+++ b/cppe/src/IceE/Reference.cpp
@@ -489,7 +489,11 @@ IceInternal::FixedReference::getConnection() const
// datagram then we throw a NoEndpointException since IceE lacks
// this support.
//
- if(getSecure() || getMode() == ModeDatagram || getMode() == ModeBatchDatagram || _fixedConnections.empty())
+ if(getSecure() || getMode() == ModeDatagram || getMode() == ModeBatchDatagram || _fixedConnections.empty()
+#ifndef ICEE_HAS_BATCH
+ || getMode() == ModeBatchOneway
+#endif
+ )
{
NoEndpointException ex(__FILE__, __LINE__);
ex.proxy = toString();
@@ -822,6 +826,15 @@ IceInternal::DirectReference::toString() const
ConnectionPtr
IceInternal::DirectReference::getConnection() const
{
+#ifndef ICEE_HAS_BATCH
+ if(getMode() == ModeBatchOneway)
+ {
+ NoEndpointException ex(__FILE__, __LINE__);
+ ex.proxy = toString();
+ throw ex;
+ }
+#endif
+
#ifdef ICEE_HAS_ROUTER
vector<EndpointPtr> endpts = Parent::getRoutedEndpoints();
if(endpts.empty())
@@ -1053,6 +1066,15 @@ IceInternal::IndirectReference::toString() const
ConnectionPtr
IceInternal::IndirectReference::getConnection() const
{
+#ifndef ICEE_HAS_BATCH
+ if(getMode() == ModeBatchOneway)
+ {
+ NoEndpointException ex(__FILE__, __LINE__);
+ ex.proxy = toString();
+ throw ex;
+ }
+#endif
+
ConnectionPtr connection;
while(true)