CORBA 2.3.3 Programmer's Guide for C++
Demarshal the legacy reply message.3.
Translate the legacy results into CORBA interface components.4.
Return.5.
If the POA for your server wrapper uses the default threading policy (ORB_CTRL_MODEL), NonStop CORBA
automatically creates a new thread, as needed, for each CORBA request to the wrapper. Existing threads are recycled;
when a request completes, its thread is returned to the thread pool for later reuse.
If you need to do explicit multithreading, HP recommends that you use the vthread interface unless you require
conformance to POSIX threading standards. For more information, refer to Writing Multithreaded Applications.
The programming interfaces the server wrapper uses to communicate with the legacy server depend on the kind of legacy
server and whether it performs waited or nowait communication with the server.
For nowait communication with context-free Pathway servers, the wrapper can use the DCE_SERVERCLASS_SEND_
procedure, described in the NonStop DCE Application Programming Guide. This procedure provides a thread-blocking
jacket for context-free Pathsend calls.
For waited requests and replies, the wrapper can use conventional means of access to legacy servers of various types:
Pathsend requests for access to server pools●
Guardian file-system requests for access to individual local processes, using methods from the NonStop CORBA
event framework
●
Socket requests for access to remote processes, using methods from the NonStop CORBA event framework●
Note
Although context-free and context-sensitive Pathsend are conceptually similar to stateless and stateful CORBA objects,
they are not exactly the same. Internally, the NonStop CORBA ORB uses context-sensitive Pathsend calls to send
requests to stateless servants because the context-sensitive Pathsend interface allows indefinitely long messages to be
sent to the same process.
Calling a Context-Free Pathway Server for Nowait Operations
The simplest type of legacy wrapper involves nowait calls to a context-free Pathway server. A NonStop CORBA client
can use the services of such a server by calling the DCE_SERVERCLASS_SEND_ routine. This routine sends a message
to, and receives a reply message from, a server process in a TS/MP server class. It is a jacket procedure that converts
process-blocking SERVERCLASS_SEND_ calls to thread-blocking calls.
This type of server-wrapper program must do the following:
Include the $NSD_ROOT/include/pthread.h header file in your program:
#include <pthread.h>
1.
Create a POA and servant.2.
Send data and receive replies by making calls to the DCE_SERVERCLASS_SEND_ procedure.3.
For further information about the DCE_SERVERCLASS_SEND_ procedure, refer to the NonStop DCE Application
Programming Manual.