Instantiating the NIC Factory Class
The way you instantiate the NIC factory depends on the object request broker (ORB) configuration:
If the NIC proxy uses the default ORB, call the following method in the application:NicFactory nicFactory = NicFactory.getInstance();
This code instantiates a new NIC factory. Unless the NicFactory.destroy method has been called, subsequent calls to this method will return the instantiated NIC factory.
If the NIC proxy does not use the default ORB, call the following method:NicFactory.initialize(props);NicFactory nicFactory = NicFactory.getInstance();
props—java.util.Properties object, which contains the ORB properties for the NIC proxy. For example, if the NIC proxy uses JacORB but JacORB is not the default ORB, the ORB properties are:org.omg.CORBA.ORBClass=org.jacorb.orb.ORBorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
This code will instantiate a new NIC factory using the specified ORB. Unless the application has called the NicFactory.destroy method, subsequent calls to the getInstance() method will return the instantiated NIC factory. However, if the application has called the destroy() method, it must recall the initialize() method before it can call the getInstance() method.
For information about the NicFactory.destroy method, see Removing the NIC Proxies.