public static SecurityService create() { ResinSystem server = ResinSystem.getCurrent(); if (server == null) { throw new IllegalStateException( L.l("ResinSystem is not active in {0}", Thread.currentThread().getContextClassLoader())); } synchronized (server) { SecurityService service = server.getService(SecurityService.class); if (service == null) { service = new SecurityService(); server.addService(service); } return service; } }
public static TopologyService getCurrent() { return ResinSystem.getCurrentService(TopologyService.class); }
public static SecurityService getCurrent() { return ResinSystem.getCurrentService(SecurityService.class); }