}
earContext.addGBean(resourceAdapterModuleData);
//register the instances we will create later
GerConnectorType geronimoConnector = (GerConnectorType) module.getVendorDD();
GerResourceadapterType[] geronimoResourceAdapters = geronimoConnector.getResourceadapterArray();
for (int k = 0; k < geronimoResourceAdapters.length; k++) {
GerResourceadapterType geronimoResourceAdapter = geronimoResourceAdapters[k];
if (resourceadapter.isSetResourceadapterClass()) {
// set the resource adapter class and activationSpec info map
try {
if (resourceadapter.isSetInboundResourceadapter() && resourceadapter.getInboundResourceadapter().isSetMessageadapter()) {
String resourceAdapterName = geronimoResourceAdapter.getResourceadapterInstance().getResourceadapterName();
ObjectName resourceAdapterObjectName = NameFactory.getComponentName(null, null, null, null, null, resourceAdapterName, NameFactory.JCA_RESOURCE_ADAPTER, resourceJ2eeContext);
GBeanData resourceAdapterData = new GBeanData(resourceAdapterObjectName, null);
earContext.addGBean(resourceAdapterData);
}
} catch (MalformedObjectNameException e) {
throw new DeploymentException("Could not construct resource adapter instance", e);
}
}
if (geronimoResourceAdapter.isSetOutboundResourceadapter()) {
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);
}
}
}
}
for (int i = 0; i < geronimoConnector.getAdminobjectArray().length; i++) {
GerAdminobjectType gerAdminObject = geronimoConnector.getAdminobjectArray()[i];
for (int j = 0; j < gerAdminObject.getAdminobjectInstanceArray().length; j++) {
GerAdminobjectInstanceType gerAdminObjectInstance = gerAdminObject.getAdminobjectInstanceArray()[j];
ObjectName adminObjectObjectName = null;
try {