private ActiveResourceAdapter getActiveRA(ConnectorDescriptor cd, String moduleName) throws ConnectorRuntimeException{ Collection<ActiveResourceAdapter> activeRAs = activeRAHabitat.getAllByContract(ActiveResourceAdapter.class); for(ActiveResourceAdapter activeRA : activeRAs){ if(activeRA.handles(cd, moduleName)){ if(_logger.isLoggable(Level.FINEST)){ _logger.log(Level.FINEST,"found active-RA for the module [ "+moduleName+" ] " + activeRA.getClass().getName()); } return activeRA; } } if(cd.getInBoundDefined()){ // did not find a suitable Active RA above. // [Possibly the profile (eg: WEB profile) does not support it] // Let us provide outbound support. _logger.log(Level.INFO, "Deployed RAR [ "+moduleName+" ] has inbound artifacts, but the runtime " + "does not support it. Providing only outbound support "); return activeRAHabitat.getComponent(ActiveResourceAdapter.class, ConnectorConstants.AORA); } //could not fine any impl. throw new ConnectorRuntimeException("Unable to get active RA for module " + moduleName); } }