360 DCE Replacement Strategies
stat = bp->execute_request_loop( ::CORBA::BOA::SOMD_WAIT );
cout << "execute_request_loop has returned!" << endl;
// Terminate the server.
// Unbind the Greet object from the greet naming context.
cout << "Unbinding the Greet object" << endl;
try {
greetNameContext->unbind( *nc );
}
catch( ::CORBA::SystemException &ex ) {
cerr << "ERROR: SystemException minor = " << ex.minor() <<
" and id = " << ex.id();
cerr << " was received when calling unbind()" << endl;
}
// Remove the greet naming context.
try {
greetNameContext->destroy();
}
catch( ::CosNaming::NamingContext::NotEmpty e ) {
cerr << "ERROR: destroy threw NotEmpty" << endl;
}
release_resources( bp, imp, op );
delete shutdownObj;
delete nc;
cout << "Exiting GreetServer..." << endl;
cout.flush();
return 0;
}
Revised application logic
Description: The C code for the application logic part revised to remove DCE
dependencies
File name: server_manager.c
#include <stdio.h>
#include "CWrapper.h"
void greet_mirror( const char * client_greeting, char * server_reply ) {
char tmp[STR_SZ];
int i,msglen;
msglen = strlen( client_greeting );
printf( "The client says: %s\n", client_greeting );

Get DCE Replacement Strategies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.