FileDocCategorySizeDatePackage
FactoryForSecurityManagerFactoryImpl.javaAPI DocGlassfish v2 API3709Fri May 04 22:35:32 BST 2007com.sun.enterprise.security.factory

FactoryForSecurityManagerFactoryImpl

public class FactoryForSecurityManagerFactoryImpl extends Object implements FactoryForSecurityManagerFactory
Creates a Singleton for FactoryForSecurityManagerImpl
author
Harpreet Singh

Fields Summary
private static final ReadWriteLock
rwLock
private static FactoryForSecurityManagerFactory
_theFactory
private static String
WEB
private static String
EJB
Constructors Summary
private FactoryForSecurityManagerFactoryImpl()
Creates a new instance of FactoryForSecurityManagerFactoryImpl

    
           
      
    
Methods Summary
public static FactoryForSecurityManagerFactorygetInstance()

        try {
            rwLock.readLock().lock();
            if (_theFactory != null) {
                return _theFactory;
            }
        } finally {
            rwLock.readLock().unlock();
        }

        try {
            rwLock.writeLock().lock();
            if (_theFactory == null) {
                _theFactory = new FactoryForSecurityManagerFactoryImpl();
            }
            return _theFactory;
        } finally {
            rwLock.writeLock().unlock();
        }
    
public SecurityManagerFactorygetSecurityManagerFactory(java.lang.String type)

        if(type.equalsIgnoreCase(WEB)){
//            return WebSecurityManagerFactory.getInstance();            
        } else if (type.equalsIgnoreCase(EJB)){
            return EJBSecurityManagerFactory.getInstance();
        }
        return null;