Ejemplo n.º 1
0
  public JavinSecurityManager() {
    if (!isDisabled()) {

      String userServiceProviderClassName = JavinConfig.get().getSecure().getUserServiceProvider();
      Class<?> userServiceProviderClass;
      try {
        userServiceProviderClass = Class.forName(userServiceProviderClassName);
      } catch (ClassNotFoundException e) {
        throw new JavinRuntimeException(
            "Can't load UserServiceProvider impl: " + userServiceProviderClassName, e);
      }

      try {
        userServiceProvider = (UserServiceProvider) userServiceProviderClass.newInstance();
      } catch (Exception e) {
        throw new JavinRuntimeException(
            "Can't instantiate UserServiceProvider impl: " + userServiceProviderClassName, e);
      }
    }
  }
Ejemplo n.º 2
0
 public static boolean isDisabled() {
   return JavinConfig.get().getSecure().isDisabled();
 }