//
// DEVELOPERS NOTE: if you change the id generation code here, you must change
// the id generation code in AutoConfig$AppResources
//
Connector connector = connectorModule.getConnector();
ConnectorInfo connectorInfo = new ConnectorInfo();
connectorInfo.description = connector.getDescription();
connectorInfo.displayName = connector.getDisplayName();
connectorInfo.codebase = connectorModule.getJarLocation();
connectorInfo.moduleId = connectorModule.getModuleId();
connectorInfo.watchedResources.addAll(connectorModule.getWatchedResources());
List<URL> libraries = connectorModule.getLibraries();
for (URL url : libraries) {
File file = toFile(url);
try {
connectorInfo.libs.add(file.getCanonicalPath());
} catch (IOException e) {
throw new IllegalArgumentException("Invalid application lib path " + file.getAbsolutePath());
}
}
ResourceAdapter resourceAdapter = connector.getResourceAdapter();
if (resourceAdapter.getResourceAdapterClass() != null) {
String id = getId(connectorModule);
String className = resourceAdapter.getResourceAdapterClass();
ServiceProvider provider = new ServiceProvider(className, id, "Resource");