FileDocCategorySizeDatePackage
ConnectorResourcesLoader.javaAPI DocGlassfish v2 API6779Fri Jun 29 05:02:08 BST 2007com.sun.enterprise.server

ConnectorResourcesLoader

public class ConnectorResourcesLoader extends ResourcesLoader
author
Srikanth P
version

Fields Summary
static Logger
_logger
Constructors Summary
public ConnectorResourcesLoader()
context of the server instance runtime

    
           


       
        super(); 
    
Methods Summary
public voidload()

        ConfigBean[][] cb = null;
        try {
            ResourcesUtil resourceUtil = ResourcesUtil.createInstance();
            cb = resourceUtil.getConnectorResources();
            if(cb != null)
                load(cb);
        }
        catch(ConfigException ce) {
            _logger.log(Level.SEVERE,"core.connectorresource_read_error" );
            _logger.log(Level.SEVERE,"" ,ce);
        }
    
public voidload(java.lang.String rarName)


        ConfigBean[][] cb = null;
        try {
            ResourcesUtil resourceUtil = ResourcesUtil.createInstance();
            cb = resourceUtil.getAllConnectorResourcesForRar(rarName);
            if(cb != null)
                load(cb);
        }
        catch(ConfigException ce) {
            _logger.log(Level.SEVERE,"core.connectorresource_read_error" );
            _logger.log(Level.SEVERE,"" ,ce);

        }
    
public voidloadConnectorResources()

        ConfigBean[][] cb = null;
        try {
            ResourcesUtil resourceUtil = ResourcesUtil.createInstance();
            cb = resourceUtil.getStandAloneNonSystemRarConnectorResourcesWithoutRAConfigs();
            if(cb != null)
                load(cb);
        }
        catch(ConfigException ce) {
            _logger.log(Level.SEVERE,"core.connectorresource_read_error" );
            _logger.log(Level.SEVERE,"" ,ce);
        }
    
public voidloadEmbeddedRarRAConfigs(java.lang.String appName)

        ConfigBean[][] cb = new ConfigBean[1][];;
        try {
            ResourcesUtil resourceUtil = ResourcesUtil.createInstance();
            ConfigBean[] raConfBeans = 
                    resourceUtil.getEmbeddedRarResourceAdapterConfigs(appName);
            if(raConfBeans != null) {
                cb[0] = raConfBeans;
                load(cb);
            }
        }
        catch(ConfigException ce) {
            _logger.log(Level.SEVERE,"core.connectorresource_read_error" );
            _logger.log(Level.SEVERE,"" ,ce);
        }
    
public voidloadEmbeddedRarResources(java.lang.String appName, Application appDesc)


        Set rars = appDesc.getRarDescriptors();

        for (Iterator itr = rars.iterator(); itr.hasNext();) {
            ConnectorDescriptor cd = (ConnectorDescriptor) itr.next();
            String rarName = cd.getDeployName();
            String embeddedRarName = appName+
                       ConnectorConstants.EMBEDDEDRAR_NAME_DELIMITER+
                       FileUtils.makeFriendlyFilenameNoExtension(rarName);
            load(embeddedRarName);
        }
    
public voidloadRAConfigs()

        ConfigBean[][] cb = new ConfigBean[1][];;
        try {
            ConfigBean[] raConfBeans = ResourcesUtil.createInstance().getResourceAdapterConfigs();
            if(raConfBeans != null) {
                cb[0] = raConfBeans;
                load(cb);
            }
        }
        catch(ConfigException ce) {
            _logger.log(Level.SEVERE,"core.connectorresource_read_error" );
            _logger.log(Level.SEVERE,"" ,ce);
        }
    
public voidloadRAConfigs(java.lang.String rarName)

        ConfigBean[][] cb = new ConfigBean[1][];;
        try {
            ResourcesUtil resourceUtil = ResourcesUtil.createInstance();
            ConfigBean[] raConfBeans = resourceUtil.getResourceAdapterConfigs(rarName);
            if(raConfBeans != null) {
                cb[0] = raConfBeans;
                load(cb);
            }
        }
        catch(ConfigException ce) {
            _logger.log(Level.SEVERE,"core.connectorresource_read_error" );
            _logger.log(Level.SEVERE,"" ,ce);
        }
    
public voidstopActiveResourceAdapters()

        ConnectorRuntime.stopAllActiveResourceAdapters();