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