GerConnectionDefinitionType[] connectionDefinitions = outboundResourceadapter.getConnectionDefinitionArray();
if (connectionDefinitions.length == 0) {
//we are new
for (int i = 0; i < connectionDefinitionDDBeans.length; i++) {
DDBean connectionDefinitionDdBean = connectionDefinitionDDBeans[i];
GerConnectionDefinitionType connectionDefinition = outboundResourceadapter.addNewConnectionDefinition();
String connectionfactoryInterface = connectionDefinitionDdBean.getText("connectionfactory-interface")[0];
ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(connectionDefinitionDdBean, connectionDefinition);
connectionDefinitionsMap.put(connectionfactoryInterface, connectionDefinitionDConfigBean);
}
} else {
//we are read in from xml. Check correct length
assert connectionDefinitionDDBeans.length == connectionDefinitions.length;
for (int i = 0; i < connectionDefinitionDDBeans.length; i++) {
DDBean connectionDefinitionDdBean = connectionDefinitionDDBeans[i];
GerConnectionDefinitionType connectionDefinition = connectionDefinitions[i];
String connectionfactoryInterface = connectionDefinitionDdBean.getText("connectionfactory-interface")[0];
assert connectionfactoryInterface.equals(connectionDefinition.getConnectionfactoryInterface());
ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(connectionDefinitionDdBean, connectionDefinition);
connectionDefinitionsMap.put(connectionfactoryInterface, connectionDefinitionDConfigBean);
}
}