![]() |
Overview Executes the next pending remote request in a server application. Original class CORBA module: BOA Class Exceptions CORBA::SystemException
Intended Usage
This method is intended to be used by a server application to execute the next remote request received from a remote client, and send the response to the waiting client. Both blocking and non-blocking calls are supported. Requests are executed in first-in-first-out order only. This method should be called only after CORBA::BOA::impl_is_ready has been called successfully.
This method is an IBM(R) extension to the CORBA specification.
IDL Syntax
virtual CORBA::Status execute_next_request (CORBA::Flags waitFlag);
Input parameters
- waitFlag
- Whether the application wants to wait (block), if there is no request currently available to process. Valid values are CORBA::BOA::SOMD_WAIT and CORBA::BOA::SOMD_NO_WAIT.
Return values
- CORBA::Status
- A zero return value indicates success. If the input parameter is CORBA::BOA::SOMD_NO_WAIT, a return value of SOMDERROR_NoMessages indicates that there is no available request to service.
Example
#include "corba.h" void main(int argc, char* argv[]) { /* Initialize the server's ImplementationDef, ORB, and BOA: */ CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository; /* Assume dummyServer is already registered in the implementation repository */ CORBA::ImplementationDef_ptr imp = implrep->find_impldef_by_alias ("dummyServer"); extern static CORBA::ORB_ptr op; /* assume previously initialized */ extern static CORBA::BOA_ptr bp; /* assume previously initialized */ bp->impl_is_ready(imp); ... /* Execute the next pending remote request */ while(1) bp->execute_next_request(CORBA::BOA::SOMD_WAIT); ... }#include "corba.h" void main(int argc, char* argv[]) { /* Initialize the server's ImplementationDef, ORB, and BOA: */ CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository; /* Assume dummyServer is already registered in the implementation repository */ CORBA::ImplementationDef_ptr imp = implrep->find_impldef_by_alias ("dummyServer"); static CORBA::ORB_ptr op = CORBA::ORB_init(argc, argv, "DSOM"); static CORBA::BOA_ptr bp = op->BOA_init(argc, argv, "DSOM_BOA"); bp->impl_is_ready(imp); ... /* Execute the next pending remote request */ while(1) bp->execute_next_request(CORBA::BOA::SOMD_WAIT); ... }