*/
private void initializeTransport(final ORB orb)
{
ORBData od = orb.getORBData();
CorbaContactInfoListFactory contactInfoListFactory =
od.getCorbaContactInfoListFactory();
Acceptor[] acceptors = od.getAcceptors();
// BEGIN Legacy
ORBSocketFactory legacySocketFactory = od.getLegacySocketFactory();
USLPort[] uslPorts = od.getUserSpecifiedListenPorts() ;
setLegacySocketFactoryORB(orb, legacySocketFactory);
// END Legacy
//
// Check for incorrect configuration.
//
if (legacySocketFactory != null && contactInfoListFactory != null) {
throw wrapper.socketFactoryAndContactInfoListAtSameTime();
}
if (acceptors.length != 0 && legacySocketFactory != null) {
throw wrapper.acceptorsAndLegacySocketFactoryAtSameTime();
}
//
// Client and Server side setup.
//
od.getSocketFactory().setORB(orb);
//
// Set up client side.
//
if (legacySocketFactory != null) {
// BEGIN Legacy
// Since the user specified a legacy socket factory we need to
// use a ContactInfoList that will use the legacy socket factory.
contactInfoListFactory =
new CorbaContactInfoListFactory() {
public void setORB(ORB orb) { }
public CorbaContactInfoList create( IOR ior ) {
return new SocketFactoryContactInfoListImpl(
orb, ior);
}
};
// END Legacy
} else if (contactInfoListFactory != null) {
// The user specified an explicit ContactInfoListFactory.
contactInfoListFactory.setORB(orb);
} else {
// Use the default.
contactInfoListFactory =
TransportDefault.makeCorbaContactInfoListFactory(orb);
}