1.5.3 How Factory-based Is Implemented
To implement factory-based routing, you must change the way your factories create object references. First, you must coordinate with the system designer to determine the fields and values to be used as the basis for routing. Then, for each interface, you must configure factory-based routing such that the interface definition for the factory specifies the parameter that represents the routing criteria that is used to determine the group ID.
To configure factory-based routing, define the following
information in the UBBCONFIG
file:
- Routing criteria identifier for a CORBA interface in the
INTERFACES
section. - As many server groups as are required for distributing the
system in the
GROUPS
section. - Routing criteria in the
ROUTING
section. - Groups, machines, and databases as required.
Note:
When implementing factory-based routing, remember that an object with a given interface and OID can be simultaneously active in two different groups if those two groups both contain the same object implementation. This can be avoided if your factories generate unique OIDs. To guarantee that only one object instance of a given interface name and OID is available at any one time in your domain, you must either:- Use factory-based routing to ensure that objects with a particular OID are always routed to the same group, or
- Configure your domain so that a given object implementation is in only one group.
If multiple clients have an object reference that contains a given interface name and OID, the reference will always be routed to the same object instance.
Thereafter, the object reference will contain additional information that is used to provide an indication of where the target server exists. Factory-based routing is performed once per CORBA object, when the object reference is created.
Parent topic: Using Factory-Based Routing (CORBA Servers Only)