CORBA 2.3.3 Programmer's Guide for C++ (NonStop CORBA 2.3.3+)

Caution
Although you should refer to the NonStop DCE Application Programming Manual for information about the
DCE_SERVERCLASS_SEND_ procedure, do not use the libraries provided by the NonStop DCE product; doing so may
interfere with the operation of the NonStop CORBA ORB. Instead, use the version of the pthread.h header file
provided in the $NSD_ROOT/include directory, which includes the DCE_SERVERCLASS_SEND_ procedure and
all necessary underlying routines.
Calling a Context-Free or Context-Sensitive Pathsend Server for Waited
Operations
A NonStop CORBA client can use a server-wrapper process to issue waited requests to a context-free or
context-sensitive Pathsend server.
This type of server-wrapper program must do the following:
Create the appropriate POA (stateless or stateful) for the wrapper. The conditions affecting this choice are
described below.
1.
Send data and receive replies by making calls to either context-free (SERVERCLASS_SEND_) or
context-sensitive (SERVERCLASS_DIALOG_xxx) Pathsend procedures. In the calls to SERVERCLASS_SEND_
or SERVERCLASS_DIALOG_SEND_, set the nowait flag (flags.<15>) to 0.
2.
The choice of a stateless or a stateful POA for the server wrapper depends on several factors:
Whether the legacy server is context-free or context-sensitive
How you map client requests to server dialogs if the legacy server is context-sensitive
Whether you need multiple wrapper processes to handle a high volume of requests
If the legacy server is context-free, you can use either a stateless or a stateful POA. A stateless POA allows you to take
advantage of server pools and is, therefore, advisable unless the volume of incoming requests is low.
If the legacy server is context-sensitive and you are mapping multiple incoming requests to a single dialog with the
server, you must use a stateful POA.
If the legacy server is context-sensitive and you map each incoming request to a new dialog, you can use either a stateless
or a stateful POA. As with a context-free server, a stateless POA is advisable unless the incoming request volume is low.
Caution
Do not use waited I/O operations with multithreading. Waited I/O operations are process-blocking operations and, as
such, defeat the purpose of multithreading.
For further information about the context-free and context-sensitive Pathsend procedures, refer to the TS/MP Pathsend
and Server Programming Manual.
Calling a TCP/IP Server
A NonStop CORBA client can use a server-wrapper process to issue TCP/IP socket requests to a legacy server. Because
no thread-blocking jacket is available for these calls, a more complicated technique is necessary, using the
object-oriented interfaces (APIs) to the NonStop CORBA event framework. If you are writing a server wrapper that
issues TCP/IP socket requests, you should refer to The NonStop CORBA Event Framework APIs for background
information.
A NonStop CORBA server acting as a server wrapper sends requests to legacy servers in the form of I/O events through