*
* @return An ORB instance configured for the CORBABean.
* @exception ConfigException
*/
public ORB createServerORB(CORBABean server) throws ConfigException {
ORB orb = createORB(server.getURI(), server, translateToArgs(server), translateToProps(server));
// check the tss config for a transport mech definition. If we have one, then
// the port information will be passed in that config, and the port in the IIOP profile
// needs to be zero.
TSSConfig config = server.getTssConfig();
TSSTransportMechConfig transportMech = config.getTransport_mech();
if (transportMech != null) {
if (transportMech instanceof TSSSSLTransportConfig) {
Any any = orb.create_any();
any.insert_boolean(true);
try {
Policy portPolicy = orb.create_policy(ZERO_PORT_POLICY_ID.value, any);
Policy[] overrides = new Policy [] { portPolicy };
server.setPolicyOverrides(overrides);
} catch (org.omg.CORBA.PolicyError e) {
// shouldn't happen, but we'll let things continue with no policy set.
}