FileDocCategorySizeDatePackage
ConnectorAdminObjectAdminServiceImpl.javaAPI DocGlassfish v2 API4690Fri May 04 22:34:22 BST 2007com.sun.enterprise.connectors

ConnectorAdminObjectAdminServiceImpl

public class ConnectorAdminObjectAdminServiceImpl extends ConnectorServiceImpl implements ConnectorAdminService
AdminObject administration service. It performs the functionality of creating and deleting the Admin Objects
author
Binod P.G and Srikanth P

Fields Summary
Constructors Summary
public ConnectorAdminObjectAdminServiceImpl()

        super();
    
Methods Summary
public voidaddAdminObject(java.lang.String appName, java.lang.String connectorName, java.lang.String jndiName, java.lang.String adminObjectType, java.util.Properties props)

        ActiveResourceAdapter ar = 
                    _registry.getActiveResourceAdapter(connectorName);
        if(ar == null) {
            ifSystemRarLoad(connectorName);
            ar = _registry.getActiveResourceAdapter(connectorName);
        }
        if (ar instanceof ActiveInboundResourceAdapter)  {
            ActiveInboundResourceAdapter air = 
                            (ActiveInboundResourceAdapter) ar;
            air.addAdminObject(appName,connectorName,jndiName,
                            adminObjectType, props);
        } else {
            ConnectorRuntimeException cre = new ConnectorRuntimeException(
                            "This adapter is not 1.5 compliant");
            _logger.log(Level.SEVERE, 
                            "rardeployment.non_1.5_compliant_rar",jndiName);
            throw cre;
        }
    
public voiddeleteAdminObject(java.lang.String jndiName)


        try {
            InitialContext ic = new InitialContext();
            ic.unbind(jndiName);
        }
        catch(NamingException ne) {
            ResourcesUtil resutil = ResourcesUtil.createInstance();
            if(resutil.adminObjectBelongsToSystemRar(jndiName)) {
                return;
            }
            if(ne instanceof NameNotFoundException){
                _logger.log(Level.FINE,
                  "rardeployment.admin_object_delete_failure",jndiName);
                _logger.log(Level.FINE,"", ne);
                return;
            }
            ConnectorRuntimeException cre = new ConnectorRuntimeException(
                           "Failed to delete admin object from jndi");
            cre.initCause(ne);
            _logger.log(Level.SEVERE,
                  "rardeployment.admin_object_delete_failure",jndiName);
            _logger.log(Level.SEVERE,"", cre);
            throw cre; 
        }