The generic server program (somdsvr), the SOMOA, and the SOMDServer make it easy to use SOM classes with DSOM. However, if there are any parts of the class implementation that were written expecting a single-process environment, the class may have to be modified to behave properly in a client/server environment. Some common implementation practices to avoid are listed below
Note: Passing textual output between the client program and the called method via an "inout string" parameter is strongly discouraged. As discussed in the CORBA 1.1 specification (page 94), the size of the output string is constrained by the size of the input string. If there was no input string value, the size of the output string would be constrained to 0 bytes. Instead, it is preferred that textual data be returned either as an output string (DSOM provides the storage), or by passing a character array buffer (client provides the storage).
In addition to those coding practices which simply do not "port" to a distributed environment, there are a few other restrictions that are imposed by DSOM's (current) implementation.
In addition to the above types, DSOM also supports method parameters of type pointer to one of the above types (for example, long*). Pointers to pointers are not supported, however, and pointers embedded within one of the above types (for example, a pointer within a struct) are not supported. The "void*" type is also not supported. Currently, DSOM has the limitation that NULL pointer values cannot be returned as inout or out method arguments, although it is expected that this limitation will be addressed in the future release.
Types declared as SOMFOREIGN types are not currently supported by DSOM.
Some applications may need to associate specific identification information with an object, to support application-specific object location or activation. In that case, an application server should create object references explicitly, using the create or create_constant method in SOMOA. A logical place to put these calls is in a subclass of SOMDServer, as it is the server object that is responsible for producing/activating objects from object references.