Why and when to perform this task
Use this task to add code to the source file for a CORBA server and cause the server to enter its request loop. This allows the server to respond to requests received from clients.
To cause the server to enter its request loop, edit the server source file, servantServer.cpp, and add the following code to the main() function:
int main( int argc, char *argv[] ) { . . initialization code . . . create and bind the servant object . . . Create the shutdown object . // Enter the request loop. cout << "Server is ready for e-business..." << endl; ::CORBA::Status stat = boaPtr->execute_request_loop ( ::CORBA::BOA::SOMD_WAIT ); // Terminate the server. cout << "Server is now shutting down..." << endl; . . . return 0; }
Results
This task adds code that causes the CORBA server to enter its request-processing loop. During this loop, the server can service incoming requests for the servant object or objects that it hosts.What to do next
Add code to the server source file to enable the server to complete the server shut down when requested as described in Adding code to shutdown the server and release resources used.