1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
// $Id$
#include "tao/PortableServer/Direct_Collocation_Upcall_Wrapper.h"
#if (TAO_HAS_MINIMUM_CORBA == 0)
# include "tao/PortableServer/ForwardRequestC.h"
#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
#include "tao/Abstract_Servant_Base.h"
#include "tao/SystemException.h"
#include "tao/ORB_Constants.h"
#include "tao/Object.h"
#include "tao/Environment.h"
ACE_RCSID (PortableServer,
Direct_Collocation_Upcall_Wrapper,
"$Id$")
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
void
TAO::Direct_Collocation_Upcall_Wrapper::upcall (
CORBA::Object_ptr obj,
CORBA::Object_out forward_obj,
TAO::Argument ** args,
int num_args,
const char * op,
size_t op_len,
TAO::Collocation_Strategy strategy)
ACE_THROW_SPEC ((CORBA::Exception))
{
TAO_Abstract_ServantBase * const servant = obj->_servant ();
TAO_Collocated_Skeleton collocated_skel;
int const status = servant->_find (op,
collocated_skel,
strategy,
op_len);
if (status == -1)
{
throw ::CORBA::BAD_OPERATION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO);
}
try
{
collocated_skel (servant,
args,
num_args);
}
#if (TAO_HAS_MINIMUM_CORBA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
catch ( ::PortableServer::ForwardRequest& forward_request)
{
forward_obj =
CORBA::Object::_duplicate (forward_request.forward_reference.in ());
return;
}
#else
catch ( ::CORBA::Exception& ex)
{
ACE_UNUSED_ARG (forward_obj);
throw;
}
#endif /* TAO_HAS_MINIMUM_CORBA && !CORBA_E_COMPACT && !CORBA_E_MICRO*/
}
TAO_END_VERSIONED_NAMESPACE_DECL
|