private void populateConnectorConnectionPool(ConnectorConnectionPool ccp,
String connectionDefinitionName, String rarName,
List<Property> props, List<SecurityMap> securityMaps)
throws ConnectorRuntimeException {
ConnectorDescriptor connectorDescriptor = runtime.getConnectorDescriptor(rarName);
if (connectorDescriptor == null) {
ConnectorRuntimeException cre = new ConnectorRuntimeException("Failed to get connection pool object");
_logger.log(Level.SEVERE, "rardeployment.connector_descriptor_notfound_registry", rarName);
_logger.log(Level.SEVERE, "", cre);
throw cre;
}
Set connectionDefs =
connectorDescriptor.getOutboundResourceAdapter().getConnectionDefs();
ConnectionDefDescriptor cdd = null;
Iterator it = connectionDefs.iterator();
while (it.hasNext()) {
cdd = (ConnectionDefDescriptor) it.next();
if (connectionDefinitionName.equals(cdd.getConnectionFactoryIntf()))
break;
}
ConnectorDescriptorInfo cdi = new ConnectorDescriptorInfo();
cdi.setRarName(rarName);
cdi.setResourceAdapterClassName(connectorDescriptor.getResourceAdapterClass());
cdi.setConnectionDefinitionName(cdd.getConnectionFactoryIntf());
cdi.setManagedConnectionFactoryClass(cdd.getManagedConnectionFactoryImpl());
cdi.setConnectionFactoryClass(cdd.getConnectionFactoryImpl());
cdi.setConnectionFactoryInterface(cdd.getConnectionFactoryIntf());
cdi.setConnectionClass(cdd.getConnectionImpl());
cdi.setConnectionInterface(cdd.getConnectionIntf());
Properties properties = new Properties();
//skip the AddressList in case of JMS RA.
//Refer Sun Bug :6579154 - Equivalent Oracle Bug :12206278
if(rarName.trim().equals(ConnectorRuntime.DEFAULT_JMS_ADAPTER)){
properties.put("AddressList","localhost");
}
Set mergedProps = ConnectorDDTransformUtils.mergeProps(props, cdd.getConfigProperties(),properties);
cdi.setMCFConfigProperties(mergedProps);
cdi.setResourceAdapterConfigProperties(connectorDescriptor.getConfigProperties());
ccp.setConnectorDescriptorInfo(cdi);
ccp.setSecurityMaps(SecurityMapUtils.getConnectorSecurityMaps(securityMaps));
}