Example #1
0
  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;
    }
  }
Example #2
0
 public static TopologyService getCurrent() {
   return ResinSystem.getCurrentService(TopologyService.class);
 }
Example #3
0
 public static SecurityService getCurrent() {
   return ResinSystem.getCurrentService(SecurityService.class);
 }