List of usage examples for org.springframework.stereotype Service getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.obiba.opal.core.runtime.DefaultOpalRuntime.java
@Override @PreDestroy/*from w w w . j a va 2s.c o m*/ public void stop() { for (Service service : services) { try { if (service.isRunning()) service.stop(); } catch (RuntimeException e) { //noinspection StringConcatenationArgumentToLogCall log.warn("Error stopping service " + service.getClass(), e); } } transactionTemplate.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus status) { // Remove all datasources before writing the configuration. // This is done so that Disposable instances are disposed of before being written to the config file for (Datasource ds : MagmaEngine.get().getDatasources()) { try { MagmaEngine.get().removeDatasource(ds); } catch (RuntimeException e) { log.warn("Ignoring exception during shutdown sequence.", e); } } } }); }
From source file:org.obiba.opal.core.runtime.DefaultOpalRuntime.java
private void initServices() { for (Service service : services) { try {//from www .ja v a 2 s . c om service.start(); } catch (RuntimeException e) { //noinspection StringConcatenationArgumentToLogCall log.warn("Error starting service " + service.getClass(), e); } } }