The way you instantiate the NIC factory depends on the object request broker (ORB) configuration:
- 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.
- NicFactory.initialize(props);
- NicFactory nicFactory = NicFactory.getInstance();
- org.omg.CORBA.ORBClass=org.jacorb.orb.ORB
- org.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.