Previous | Table of Contents | Next |
Although a general instance factory interface can be defined in either COM or CORBA, it is the common practice in COM to have
factories, which support only the IClassFactory of ICoassfactory2 interfaces. These interfaces only support parameterless
object constructors; that is, the CreateInstance() operation takes no parameters. To allow CORBA objects to be created under
this factory model in COM, the SimpleFactory interface is defined. The SimpleFactory interface is supported by all CORBA Views
of COM class factories.
module CosLifeCycle
{ interface SimpleFactory {
Object create_object(); }; };
SimpleFactory provides a generic object constructor for creating instances with no initial state. CORBA objects that can be
created with no initial state should provide factories that implement the SimpleFactory interface.