} else {
name = earApplicationName == null || earApplicationName.isEmpty() ? "" : earApplicationName + "/";
name = name + component.getModuleName() + "/" + component.getDistinctName() + "/" + component.getComponentName();
}
name = name.replace(".", "_");
final ORB orb = this.orb.getValue();
if (interfaceRepositorySupported) {
// Create a CORBA interface repository for the enterprise bean
iri = new InterfaceRepository(orb, irPoa.getValue(), name);
// Add bean interface info to the interface repository
iri.mapClass(remoteView.getValue().getViewClass());
iri.mapClass(homeView.getValue().getViewClass());
iri.finishBuild();
logger.info("CORBA interface repository for " + name + ": " + orb.object_to_string(iri.getReference()));
}
// Create csiv2Policy for both home and remote containing IorSecurityConfigMetadata
final Any secPolicy = orb.create_any();
/*
IORSecurityConfigMetaData securityConfig = container.getBeanMetaData().getIorSecurityConfigMetaData();
// if no security metadata was found, get the default metadata from the registry.
if (securityConfig == null) {
securityConfig = (IORSecurityConfigMetaData) Registry.lookup(CorbaORBService.IOR_SECURITY_CONFIG);
}
*/
//TODO: setup security config
final IORSecurityConfigMetaData securityConfig = null;
secPolicy.insert_Value(securityConfig);
csiv2Policy = null; // = orb.create_policy(CSIv2Policy.TYPE, secPolicy);
// Create SSLPolicy
// (SSL_REQUIRED ensures home and remote IORs
// will have port 0 in the primary address)
boolean sslRequired = false;
if (securityConfig != null) {
IORTransportConfigMetaData tc = securityConfig.getTransportConfig();
sslRequired = tc.getIntegrity() ==
IORTransportConfigMetaData.INTEGRITY_REQUIRED
|| tc.getConfidentiality() ==
IORTransportConfigMetaData.CONFIDENTIALITY_REQUIRED
|| tc.getEstablishTrustInClient() ==
IORTransportConfigMetaData.ESTABLISH_TRUST_IN_CLIENT_REQUIRED;
}
final Any sslPolicyValue = orb.create_any();
SSLPolicyValueHelper.insert(sslPolicyValue, (sslRequired) ? SSLPolicyValue.SSL_REQUIRED : SSLPolicyValue.SSL_NOT_REQUIRED);
sslPolicy = null; //orb.create_policy(SSL_POLICY_TYPE.value, sslPolicyValue);
logger.debug("container's SSL policy: " + sslPolicy);
// Get the POACurrent object
poaCurrent = CurrentHelper.narrow(orb.resolve_initial_references("POACurrent"));
Policy[] policies = {};
/*
if (codebasePolicy == null)
policies = new Policy[]{sslPolicy, csiv2Policy};