diff options
author | Marc Laukien <marc@zeroc.com> | 2002-12-30 18:21:47 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-12-30 18:21:47 +0000 |
commit | 608d89d46a87ad33a89a613effa50b7d469ca5a1 (patch) | |
tree | 159450e09853fd06775f1d0a6828b77e32574c4e /cpp/src/slice2java/Gen.cpp | |
parent | more amd work (diff) | |
download | ice-608d89d46a87ad33a89a613effa50b7d469ca5a1.tar.bz2 ice-608d89d46a87ad33a89a613effa50b7d469ca5a1.tar.xz ice-608d89d46a87ad33a89a613effa50b7d469ca5a1.zip |
fixed shutdown problem with _dispatchCount
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 95 |
1 files changed, 51 insertions, 44 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index db1c701a3db..b7c8495a898 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -3127,7 +3127,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) string params = getParams(op, scope); string args = getArgs(op); - out << sp; + out << sp; out << nl << "public " << retS << nl << opName << '(' << params; if(!params.empty()) { @@ -3136,49 +3136,56 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) out << "java.util.Map __context)"; writeDelegateThrowsClause(scope, throws); out << sb; - list<string> metaData = op->getMetaData(); - out << nl << "Ice.Current __current = new Ice.Current();"; - out << nl << "__initCurrent(__current, \"" << op->name() << "\", " << sliceModeToIceMode(op) - << ", __context);"; - out << nl << "while(true)"; - out << sb; - out << nl << "IceInternal.Direct __direct = new IceInternal.Direct(__current);"; - out << nl << "try"; - out << sb; - out << nl << name << " __servant = null;"; - out << nl << "try"; - out << sb; - out << nl << "__servant = (" << name << ")__direct.facetServant();"; - out << eb; - out << nl << "catch(ClassCastException __ex)"; - out << sb; - out << nl << "Ice.OperationNotExistException __opEx = new Ice.OperationNotExistException();"; - out << nl << "__opEx.id = __current.id;"; - out << nl << "__opEx.facet = __current.facet;"; - out << nl << "__opEx.operation = __current.operation;"; - out << nl << "throw __opEx;"; - out << eb; - out << nl; - if(ret) - { - out << "return "; - } - out << "__servant." << opName << '(' << args; - if(!args.empty()) - { - out << ", "; - } - out << "__current);"; - if(!ret) - { - out << nl << "return;"; - } - out << eb; - out << nl << "finally"; - out << sb; - out << nl << "__direct.destroy();"; - out << eb; - out << eb; + if(p->hasMetaData("amd") || op->hasMetaData("amd")) + { + out << nl << "throw new Ice.CollocationOptimizationException();"; + } + else + { + list<string> metaData = op->getMetaData(); + out << nl << "Ice.Current __current = new Ice.Current();"; + out << nl << "__initCurrent(__current, \"" << op->name() << "\", " << sliceModeToIceMode(op) + << ", __context);"; + out << nl << "while(true)"; + out << sb; + out << nl << "IceInternal.Direct __direct = new IceInternal.Direct(__current);"; + out << nl << "try"; + out << sb; + out << nl << name << " __servant = null;"; + out << nl << "try"; + out << sb; + out << nl << "__servant = (" << name << ")__direct.facetServant();"; + out << eb; + out << nl << "catch(ClassCastException __ex)"; + out << sb; + out << nl << "Ice.OperationNotExistException __opEx = new Ice.OperationNotExistException();"; + out << nl << "__opEx.id = __current.id;"; + out << nl << "__opEx.facet = __current.facet;"; + out << nl << "__opEx.operation = __current.operation;"; + out << nl << "throw __opEx;"; + out << eb; + out << nl; + if(ret) + { + out << "return "; + } + out << "__servant." << opName << '(' << args; + if(!args.empty()) + { + out << ", "; + } + out << "__current);"; + if(!ret) + { + out << nl << "return;"; + } + out << eb; + out << nl << "finally"; + out << sb; + out << nl << "__direct.destroy();"; + out << eb; + out << eb; + } out << eb; if(p->hasMetaData("ami") || op->hasMetaData("ami")) |