/** {@inheritDoc} */ @Override public synchronized void start(StartContext context) throws StartException { SecurityLogger.ROOT_LOGGER.debugf("Starting SubjectFactoryService"); final ISecurityManagement injectedSecurityManagement = securityManagementValue.getValue(); int i = subjectFactoryClassName.lastIndexOf(":"); if (i == -1) throw SecurityLogger.ROOT_LOGGER.missingModuleName("subject-factory-class-name attribute"); String moduleSpec = subjectFactoryClassName.substring(0, i); String className = subjectFactoryClassName.substring(i + 1); JBossSecuritySubjectFactory subjectFactory = null; try { Class<?> subjectFactoryClazz = SecurityActions.getModuleClassLoader(moduleSpec).loadClass(className); subjectFactory = (JBossSecuritySubjectFactory) subjectFactoryClazz.newInstance(); } catch (Exception e) { throw SecurityLogger.ROOT_LOGGER.unableToStartException("SubjectFactoryService", e); } subjectFactory.setSecurityManagement(injectedSecurityManagement); this.subjectFactory = subjectFactory; }
/** * @see SubjectFactory#createSubject() */ public Subject createSubject() { return createSubject(SecurityConstants.DEFAULT_APPLICATION_POLICY); }
/** {@inheritDoc} */ @Override public synchronized void start(StartContext context) throws StartException { SecurityLogger.ROOT_LOGGER.debugf("Starting SubjectFactoryService"); final ISecurityManagement injectedSecurityManagement = securityManagementValue.getValue(); int i = subjectFactoryClassName.lastIndexOf(":"); if (i == -1) throw SecurityLogger.ROOT_LOGGER.missingModuleName("subject-factory-class-name attribute"); String moduleSpec = subjectFactoryClassName.substring(0, i); String className = subjectFactoryClassName.substring(i + 1); JBossSecuritySubjectFactory subjectFactory = null; try { Class<?> subjectFactoryClazz = SecurityActions.getModuleClassLoader(moduleSpec).loadClass(className); subjectFactory = (JBossSecuritySubjectFactory) subjectFactoryClazz.newInstance(); } catch (Exception e) { throw SecurityLogger.ROOT_LOGGER.unableToStartException("SubjectFactoryService", e); } subjectFactory.setSecurityManagement(injectedSecurityManagement); this.subjectFactory = subjectFactory; }
/** {@inheritDoc} */ @Override public synchronized void start(StartContext context) throws StartException { log.debugf("Starting SubjectFactoryService"); final ISecurityManagement injectedSecurityManagement = securityManagementValue.getValue(); int i = subjectFactoryClassName.lastIndexOf(":"); if (i == -1) throw SecurityMessages.MESSAGES.missingModuleName("subject-factory-class-name attribute"); String moduleSpec = subjectFactoryClassName.substring(0, i); String className = subjectFactoryClassName.substring(i + 1); JBossSecuritySubjectFactory subjectFactory = null; try { Class<?> subjectFactoryClazz = SecurityActions.getModuleClassLoader(moduleSpec).loadClass(className); subjectFactory = (JBossSecuritySubjectFactory) subjectFactoryClazz.newInstance(); } catch (Exception e) { throw SecurityMessages.MESSAGES.unableToStartException("SubjectFactoryService", e); } subjectFactory.setSecurityManagement(injectedSecurityManagement); this.subjectFactory = subjectFactory; }
/** {@inheritDoc} */ @Override public synchronized void start(StartContext context) throws StartException { log.debugf("Starting SubjectFactoryService"); final ISecurityManagement injectedSecurityManagement = securityManagementValue.getValue(); int i = subjectFactoryClassName.lastIndexOf(":"); if (i == -1) throw SecurityMessages.MESSAGES.missingModuleName("subject-factory-class-name attribute"); String moduleSpec = subjectFactoryClassName.substring(0, i); String className = subjectFactoryClassName.substring(i + 1); JBossSecuritySubjectFactory subjectFactory = null; try { Class<?> subjectFactoryClazz = SecurityActions.getModuleClassLoader(moduleSpec).loadClass(className); subjectFactory = (JBossSecuritySubjectFactory) subjectFactoryClazz.newInstance(); } catch (Exception e) { throw SecurityMessages.MESSAGES.unableToStartException("SubjectFactoryService", e); } subjectFactory.setSecurityManagement(injectedSecurityManagement); this.subjectFactory = subjectFactory; }