Direct_Collocation_Upcall_Wrapper.cpp

Go to the documentation of this file.
00001 // Direct_Collocation_Upcall_Wrapper.cpp,v 1.6 2006/06/19 19:49:21 jwillemsen Exp
00002 
00003 #include "tao/PortableServer/Direct_Collocation_Upcall_Wrapper.h"
00004 
00005 #if (TAO_HAS_MINIMUM_CORBA == 0)
00006 # include "tao/PortableServer/ForwardRequestC.h"
00007 #endif  /* TAO_HAS_MINIMUM_CORBA == 0 */
00008 
00009 #include "tao/Abstract_Servant_Base.h"
00010 #include "tao/SystemException.h"
00011 #include "tao/ORB_Constants.h"
00012 #include "tao/Object.h"
00013 #include "tao/Environment.h"
00014 
00015 ACE_RCSID (PortableServer,
00016            Direct_Collocation_Upcall_Wrapper,
00017            "Direct_Collocation_Upcall_Wrapper.cpp,v 1.6 2006/06/19 19:49:21 jwillemsen Exp")
00018 
00019 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00020 
00021 void
00022 TAO::Direct_Collocation_Upcall_Wrapper::upcall (
00023   CORBA::Object_ptr obj,
00024   CORBA::Object_out forward_obj,
00025   TAO::Argument ** args,
00026   int num_args,
00027   const char * op,
00028   size_t op_len,
00029   TAO::Collocation_Strategy strategy
00030   ACE_ENV_ARG_DECL
00031 )
00032 ACE_THROW_SPEC ((CORBA::Exception))
00033 {
00034   TAO_Abstract_ServantBase * const servant = obj->_servant ();
00035 
00036   TAO_Collocated_Skeleton collocated_skel;
00037   int const status = servant->_find (op,
00038                                      collocated_skel,
00039                                      strategy,
00040                                      op_len);
00041 
00042   if (status == -1)
00043     {
00044       ACE_THROW (CORBA::BAD_OPERATION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO));
00045     }
00046 
00047   ACE_TRY
00048     {
00049       collocated_skel (servant,
00050                        args,
00051                        num_args
00052                        ACE_ENV_ARG_PARAMETER);
00053       ACE_TRY_CHECK;
00054     }
00055 #if (TAO_HAS_MINIMUM_CORBA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00056   ACE_CATCH (PortableServer::ForwardRequest, forward_request)
00057     {
00058       forward_obj =
00059         CORBA::Object::_duplicate (forward_request.forward_reference.in ());
00060       return;
00061     }
00062 #else
00063   ACE_CATCHANY
00064     {
00065       ACE_UNUSED_ARG (forward_obj);
00066       ACE_RE_THROW;
00067     }
00068 #endif /* TAO_HAS_MINIMUM_CORBA && !CORBA_E_COMPACT && !CORBA_E_MICRO*/
00069   ACE_ENDTRY;
00070   ACE_CHECK;
00071 }
00072 
00073 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 12:40:38 2006 for TAO_PortableServer by doxygen 1.3.6