@Test public void load() { connManager.load(); long expected = resourceDAO.findAll().stream(). filter(resource -> resource.getConnector().getLocation().startsWith("file")).count(); assertEquals(expected, ApplicationContextProvider.getBeanFactory().getBeanNamesForType(Connector.class, false, true).length); }
@Transactional(readOnly = true) @Override public void load() { CurrentLocale.set(Locale.ENGLISH); connIdBundleManager.getConnManagers(); int connectors = 0; for (ExternalResource resource : resourceDAO.findAll()) { LOG.info("Registering resource-connector pair {}-{}", resource, resource.getConnector()); try { registerConnector(resource); connectors++; } catch (Exception e) { LOG.error("While registering resource-connector pair {}-{}", resource, resource.getConnector(), e); } } LOG.info("Done loading {} connectors", connectors); }
ConnectorManager implements ConnectorRegistry, ConnectorFactory { @Transactional(readOnly = true) @Override public void load() { CurrentLocale.set(Locale.ENGLISH); connIdBundleManager.getConnManagers(); int connectors = 0; for (ExternalResource resource : resourceDAO.findAll()) { LOG.info("Registering resource-connector pair {}-{}", resource, resource.getConnector()); try { registerConnector(resource); connectors++; } catch (Exception e) { LOG.error("While registering resource-connector pair {}-{}", resource, resource.getConnector(), e); } } LOG.info("Done loading {} connectors", connectors); } }
ConnectorManager implements ConnectorRegistry, ConnectorFactory { @Transactional(readOnly = true) @Override public void load() { CurrentLocale.set(Locale.ENGLISH); connIdBundleManager.getConnManagers(); int connectors = 0; for (ExternalResource resource : resourceDAO.findAll()) { LOG.info("Registering resource-connector pair {}-{}", resource, resource.getConnector()); try { registerConnector(resource); connectors++; } catch (Exception e) { LOG.error("While registering resource-connector pair {}-{}", resource, resource.getConnector(), e); } } LOG.info("Done loading {} connectors", connectors); }  }
ConnectorManager implements ConnectorRegistry, ConnectorFactory { @Transactional(readOnly = true) @Override public void load() { CurrentLocale.set(Locale.ENGLISH); connIdBundleManager.getConnManagers(); int connectors = 0; for (ExternalResource resource : resourceDAO.findAll()) { LOG.info("Registering resource-connector pair {}-{}", resource, resource.getConnector()); try { registerConnector(resource); connectors++; } catch (Exception e) { LOG.error("While registering resource-connector pair {}-{}", resource, resource.getConnector(), e); } } LOG.info("Done loading {} connectors", connectors); }  @Override Connector getConnector(final ExternalResource resource); @Override ConnInstance buildConnInstanceOverride(
            final ConnInstanceTO connInstance,
            final Collection<ConnConfProperty> confOverride,
            final Collection<ConnectorCapability> capabilitiesOverride); @Override Connector createConnector(final ConnInstance connInstance); @Override void registerConnector(final ExternalResource resource); @Override void unregisterConnector(final String id); @Transactional(readOnly = true) @Override void load(); @Transactional(readOnly = true) @Override void unload(); }
ConnectorManager implements ConnectorRegistry, ConnectorFactory { @Transactional(readOnly = true) @Override public void load() { CurrentLocale.set(Locale.ENGLISH); connIdBundleManager.getConnManagers(); int connectors = 0; for (ExternalResource resource : resourceDAO.findAll()) { LOG.info("Registering resource-connector pair {}-{}", resource, resource.getConnector()); try { registerConnector(resource); connectors++; } catch (Exception e) { LOG.error("While registering resource-connector pair {}-{}", resource, resource.getConnector(), e); } } LOG.info("Done loading {} connectors", connectors); }  @Override Connector getConnector(final ExternalResource resource); @Override ConnInstance buildConnInstanceOverride(
            final ConnInstanceTO connInstance,
            final Collection<ConnConfProperty> confOverride,
            final Collection<ConnectorCapability> capabilitiesOverride); @Override Connector createConnector(final ConnInstance connInstance); @Override void registerConnector(final ExternalResource resource); @Override void unregisterConnector(final String id); @Transactional(readOnly = true) @Override void load(); @Transactional(readOnly = true) @Override void unload();  }