security/subsystem/src/main/java/org/jboss/as/security/service/SubjectFactoryService.java
@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;
    }
@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;
    }
@ 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}
{