public AuthenticationManager(AbstractResource properties, AbstractResource configuration) throws RemoteException { try { BeanUtils utils = new BeanUtils(configuration, properties); this.auth = utils.getAuthenticationProvider(); Set<QName> set = this.auth.getSupportedAuthenticationProfiles(); if ((set == null) || (set.size() < 1)) { throw new Exception( "The authentication provider must support at least 1 valid authentication profile."); } else if (!AuthenticationProfile.isValid(set)) { throw new Exception( "The authentication provider supports an unknown authentication profile."); } } catch (Exception ex) { throw new RemoteException( "Error instantiating AuthenticationProvider: " + ex.getMessage(), ex); } }