FileDocCategorySizeDatePackage
ResourceAdapterConfigDeployer.javaAPI DocGlassfish v2 API4256Fri May 04 22:35:14 BST 2007com.sun.enterprise.resource

ResourceAdapterConfigDeployer

public class ResourceAdapterConfigDeployer extends Object implements com.sun.enterprise.server.ResourceDeployer
author
Srikanth P

Fields Summary
static Logger
_logger
Constructors Summary
Methods Summary
public synchronized voiddeployResource(java.lang.Object resource)

           

        ResourceAdapterConfig domainConfig = 
            (com.sun.enterprise.config.serverbeans.ResourceAdapterConfig)resource;
        String rarName = domainConfig.getResourceAdapterName();
        ConnectorRuntime crt = ConnectorRuntime.getRuntime();
        _logger.log(Level.FINE,
                   "Calling backend to add resource adapterConfig ",rarName);
        crt.addResourceAdapterConfig(rarName,domainConfig);
        _logger.log(Level.FINE,
                   "Added resource adapterConfig in backend",rarName);
    
public synchronized voiddisableResource(java.lang.Object resource)


    
public synchronized voidenableResource(java.lang.Object resource)

    
public java.lang.ObjectgetResource(java.lang.String name, com.sun.enterprise.config.serverbeans.Resources rbeans)


        Object res = rbeans.getResourceAdapterConfigByResourceAdapterName(name);
        if (res == null) {
            Exception ex = new Exception("No such resource");
            _logger.log(Level.SEVERE,"no_resource",name);
            _logger.log(Level.SEVERE,"",ex);
            throw ex;
        }
        return res;
    
public synchronized voidredeployResource(java.lang.Object resource)

        deployResource(resource);
    
public synchronized voidundeployResource(java.lang.Object resource)

        ResourceAdapterConfig domainConfig = 
            (com.sun.enterprise.config.serverbeans.ResourceAdapterConfig)resource;
        String rarName = domainConfig.getResourceAdapterName();
        ConnectorRuntime crt = ConnectorRuntime.getRuntime();
        crt.deleteResourceAdapterConfig(rarName);