[22] FACTORIES AND FACTORY FINDERS UPDATED!
(Part of the CORBA FAQ, Copyright © 1996)


[22.1] WHAT IS A FACTORY? NEW!

[Recently created (7/1997). Click here to go to the next FAQ in the “chain” of recent changes]

A factory is a CORBA Object that returns another CORBA object via one of its CORBA operations. There are many different types of factories with many different purposes. In fact, the OMG has defined several services that are actually factories.

TopBottomPrevious sectionNext section ]


[22.2] WHAT ARE SOME TYPICAL TYPES OF FACTORIES? NEW!

[Recently created (7/1997). Click here to go to the next FAQ in the “chain” of recent changes]

There are several types of factories:

  1. Generic: A generic factory is a factory (CORBA Object) that is capable of returning other CORBA Objects. These CORBA Objects are generic. This means that they can be of any type, rather than a specific type. The SomeFactory::GenericCreate() operation causes the SomeFactory interface to be a generic factory. The NamingContext object defined as part of the CORBA Naming Service is a classic example of a generic factory.
  2. Specific: A specific factory is a factory (CORBA Object) that is capable of returning a specific type of pre-defined CORBA Object. The SomeFactory::SpecificCreate() operation causes the SomeFactory interface to be a specific (or typed) factory.
  3. In-process: An in-process factory is a factory which is implemented in the same process as the object which is created or managed by it.
  4. Out-process: An out-process factory is a factory which is implemented in a process different from the one of the object which is created or managed by it.

    //IDL

    interface AnObject {
      boolean ping();
    };

    interface SomeFactory {
      CORBA::Object GenericCreate();
      AnObject SpecificCreate();
    };

TopBottomPrevious sectionNext section ]


[22.3] DOES THE CORBA SPECIFICATION DEFINE ANY SPECIFIC CAPABILITIES FOR A FACTORY OBJECT? NEW!

[Recently created (7/1997). Click here to go to the next FAQ in the “chain” of recent changes]

The CORBA Lifecycle specification defines a GenericFactory interface from which all factories should inherit, but this is not required. The CORBA specification also defines a factory for factories, known as a factory finder. The factory finder is a just a CORBA factory which act as a factory for other factory interfaces.

TopBottomPrevious sectionNext section ]


E-Mail E-mail us
CORBA FAQTable of ContentsExhaustiveAlphabeticalSubject indexAbout the authors©TMDownload your own copy ]
Revised Sep 8, 1997