GerConnectionDefinitionType[] connectionDefinitions = geronimoResourceAdapter.getOutboundResourceadapter().getConnectionDefinitionArray();
for (int i = 0; i < connectionDefinitions.length; i++) {
GerConnectionDefinitionType connectionDefinition = connectionDefinitions[i];
GerConnectiondefinitionInstanceType[] connectionDefinitionInstances = connectionDefinition.getConnectiondefinitionInstanceArray();
for (int j = 0; j < connectionDefinitionInstances.length; j++) {
GerConnectiondefinitionInstanceType connectionDefinitionInstance = connectionDefinitionInstances[j];
ObjectName connectionFactoryObjectName = null;
try {
connectionFactoryObjectName = NameFactory.getComponentName(null, null, null, null, null, connectionDefinitionInstance.getName(), NameFactory.JCA_MANAGED_CONNECTION_FACTORY, resourceJ2eeContext);
} catch (MalformedObjectNameException e) {
throw new DeploymentException("Could not construct resource object name", e);
}
GBeanData connectionFactoryData = new GBeanData(connectionFactoryObjectName, null);
earContext.addGBean(connectionFactoryData);