public boolean isActive() { try { getInstance(); return serviceInstance.isActive(); } catch (ServiceImporterException e) { return false; } }
private T getInstance() throws ServiceImporterException { // DCL that works with Java 1.5 volatile semantics if (serviceInstance == null) { synchronized (this) { if (serviceInstance == null) { serviceInstance = (ImportedServiceInstance<T>) serviceModel.<T>importInstance(module); instance = serviceInstance.instance(); } } } return instance; }