4 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
7 TAO::CSD::Strategy_Base::Strategy_Base()
8 : poa_activated_(false)
14 TAO::CSD::Strategy_Base::dispatch_request
15 (TAO_ServerRequest& server_request,
16 TAO::Portable_Server::Servant_Upcall& upcall)
18 DispatchResult result;
20 if (server_request.collocated())
22 result = this->dispatch_collocated_request_i(server_request,
25 server_request.operation(),
30 result = this->dispatch_remote_request_i(server_request,
33 server_request.operation(),
39 case DISPATCH_HANDLED:
40 // Do nothing. Everything has been handled.
43 case DISPATCH_REJECTED:
44 if (server_request.collocated ())
46 CORBA::NO_IMPLEMENT ex;
51 // Raise an appropriate SystemException if the request is expecting
53 if (!server_request.sync_with_server() &&
54 server_request.response_expected() &&
55 !server_request.deferred_reply())
57 CORBA::NO_IMPLEMENT ex;
58 server_request.tao_send_reply_exception(ex);
63 case DISPATCH_DEFERRED:
64 // Perform the "default" dispatching strategy logic for this request
65 // right now, using the current thread.
66 upcall.servant()->_dispatch(server_request, &upcall);
70 if (TAO_debug_level > 0)
71 TAOLIB_ERROR((LM_ERROR,
72 ACE_TEXT("(%P|%t) Unknown result (%d) from call to ")
73 ACE_TEXT("dispatch_remote_request_i().\n"), result));
74 // Since we do not know what to do here, just do the minimum, which
75 // treats this case just like the DISPATCH_HANDLED case, for better
76 // or worse. Hitting this default case means a coding error.
84 TAO::CSD::Strategy_Base::poa_activated_event(TAO_ORB_Core& orb_core)
86 // Notify the subclass of the event, saving the result.
87 this->poa_activated_ = this->poa_activated_event_i(orb_core);
90 return this->poa_activated_;
95 TAO::CSD::Strategy_Base::poa_deactivated_event()
97 if (this->poa_activated_)
99 this->poa_activated_ = false;
101 // Notify the subclass of the event.
102 this->poa_deactivated_event_i();
104 // Reset the poa to nil to decrement the reference count.
105 // This will break the circular dependency of the deletion
113 TAO::CSD::Strategy_Base::servant_activated_event
114 (PortableServer::Servant servant,
115 const PortableServer::ObjectId& oid)
117 this->servant_activated_event_i(servant, oid);
122 TAO::CSD::Strategy_Base::servant_deactivated_event
123 (PortableServer::Servant servant,
124 const PortableServer::ObjectId& oid)
126 this->servant_deactivated_event_i(servant, oid);
129 TAO_END_VERSIONED_NAMESPACE_DECL