Setting Up the Factory Manager 

Use

If you use the FactoryManager object to create the various factory objects (instead of using the SessionManager), then you need to set it up with the appropriate middleware properties.

To use the Orbix middleware, for example, you must first initialize the Factory Manager object with this middleware type.

Procedure

Set the middleware type in your program:

  1. Create a MiddlewareInfo object specifying the middleware type (for example Orbix) and the Java RFC server host.
  2. Obtain the global FactoryManager object and set the MiddlewareInfo object to it.

If you wish to use a custom middleware type, or if you wish to specify the middleware type through the jrf.props properties file, then you need to specify middleware type to be MiddlewareInfo.middlewareTypeCustom. See the Java RFC Properties Files topic. Note that the FactoryManager does not use the r3_connection.props properties file.

Example

Sample code to set up the FactoryManager object with the provided CORBA/Orbix middleware:

MiddlewareInfo mdInfo = new MiddlewareInfo ();
mdInfo.setMiddlewareType (MiddlewareInfo.middlewareTypeOrbix);
mdInfo.setOrbServerName(rfcHost); //pass in the hostname where the
                               //Java RFC server is running.
facMan = FactoryManager.getSingleInstance();
facMan.setMiddlewareInfo(mdInfo);