Java 类org.apache.catalina.deploy.ContextResourceEnvRef 实例源码

项目:tomcat7    文件:NamingContextListener.java   
/**
 * Set the specified resources in the naming context.
 */
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) {

    // Create a reference to the resource env.
    Reference ref = new ResourceEnvRef(resourceEnvRef.getType());
    // Adding the additional parameters, if any
    Iterator<String> params = resourceEnvRef.listProperties();
    while (params.hasNext()) {
        String paramName = params.next();
        String paramValue = (String) resourceEnvRef.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
        ref.add(refAddr);
    }
    try {
        if (logger.isDebugEnabled())
            log.debug("  Adding resource env ref " + resourceEnvRef.getName());
        createSubcontexts(envCtx, resourceEnvRef.getName());
        envCtx.bind(resourceEnvRef.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", e));
    }

}
项目:lams    文件:NamingContextListener.java   
/**
 * Set the specified resources in the naming context.
 */
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) {

    // Create a reference to the resource env.
    Reference ref = new ResourceEnvRef(resourceEnvRef.getType());
    // Adding the additional parameters, if any
    Iterator params = resourceEnvRef.listProperties();
    while (params.hasNext()) {
        String paramName = (String) params.next();
        String paramValue = (String) resourceEnvRef.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
        ref.add(refAddr);
    }
    try {
        if (logger.isDebugEnabled())
            log.debug("  Adding resource env ref " + resourceEnvRef.getName());
        createSubcontexts(envCtx, resourceEnvRef.getName());
        envCtx.bind(resourceEnvRef.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", e));
    }

}
项目:apache-tomcat-7.0.73-with-comment    文件:NamingContextListener.java   
/**
 * Set the specified resources in the naming context.
 */
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) {

    // Create a reference to the resource env.
    Reference ref = new ResourceEnvRef(resourceEnvRef.getType());
    // Adding the additional parameters, if any
    Iterator<String> params = resourceEnvRef.listProperties();
    while (params.hasNext()) {
        String paramName = params.next();
        String paramValue = (String) resourceEnvRef.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
        ref.add(refAddr);
    }
    try {
        if (logger.isDebugEnabled())
            log.debug("  Adding resource env ref " + resourceEnvRef.getName());
        createSubcontexts(envCtx, resourceEnvRef.getName());
        envCtx.bind(resourceEnvRef.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", e));
    }

}
项目:lazycat    文件:NamingContextListener.java   
/**
 * Set the specified resources in the naming context.
 */
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) {

    // Create a reference to the resource env.
    Reference ref = new ResourceEnvRef(resourceEnvRef.getType());
    // Adding the additional parameters, if any
    Iterator<String> params = resourceEnvRef.listProperties();
    while (params.hasNext()) {
        String paramName = params.next();
        String paramValue = (String) resourceEnvRef.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
        ref.add(refAddr);
    }
    try {
        if (logger.isDebugEnabled())
            log.debug("  Adding resource env ref " + resourceEnvRef.getName());
        createSubcontexts(envCtx, resourceEnvRef.getName());
        envCtx.bind(resourceEnvRef.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", e));
    }

}
项目:class-guard    文件:NamingContextListener.java   
/**
 * Set the specified resources in the naming context.
 */
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) {

    // Create a reference to the resource env.
    Reference ref = new ResourceEnvRef(resourceEnvRef.getType());
    // Adding the additional parameters, if any
    Iterator<String> params = resourceEnvRef.listProperties();
    while (params.hasNext()) {
        String paramName = params.next();
        String paramValue = (String) resourceEnvRef.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
        ref.add(refAddr);
    }
    try {
        if (logger.isDebugEnabled())
            log.debug("  Adding resource env ref " + resourceEnvRef.getName());
        createSubcontexts(envCtx, resourceEnvRef.getName());
        envCtx.bind(resourceEnvRef.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", e));
    }

}
项目:apache-tomcat-7.0.57    文件:NamingContextListener.java   
/**
 * Set the specified resources in the naming context.
 */
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) {

    // Create a reference to the resource env.
    Reference ref = new ResourceEnvRef(resourceEnvRef.getType());
    // Adding the additional parameters, if any
    Iterator<String> params = resourceEnvRef.listProperties();
    while (params.hasNext()) {
        String paramName = params.next();
        String paramValue = (String) resourceEnvRef.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
        ref.add(refAddr);
    }
    try {
        if (logger.isDebugEnabled())
            log.debug("  Adding resource env ref " + resourceEnvRef.getName());
        createSubcontexts(envCtx, resourceEnvRef.getName());
        envCtx.bind(resourceEnvRef.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", e));
    }

}
项目:apache-tomcat-7.0.57    文件:NamingContextListener.java   
/**
 * Set the specified resources in the naming context.
 */
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) {

    // Create a reference to the resource env.
    Reference ref = new ResourceEnvRef(resourceEnvRef.getType());
    // Adding the additional parameters, if any
    Iterator<String> params = resourceEnvRef.listProperties();
    while (params.hasNext()) {
        String paramName = params.next();
        String paramValue = (String) resourceEnvRef.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
        ref.add(refAddr);
    }
    try {
        if (logger.isDebugEnabled())
            log.debug("  Adding resource env ref " + resourceEnvRef.getName());
        createSubcontexts(envCtx, resourceEnvRef.getName());
        envCtx.bind(resourceEnvRef.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", e));
    }

}
项目:WBSAirback    文件:NamingContextListener.java   
/**
 * Set the specified resources in the naming context.
 */
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) {

    // Create a reference to the resource env.
    Reference ref = new ResourceEnvRef(resourceEnvRef.getType());
    // Adding the additional parameters, if any
    Iterator<String> params = resourceEnvRef.listProperties();
    while (params.hasNext()) {
        String paramName = params.next();
        String paramValue = (String) resourceEnvRef.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
        ref.add(refAddr);
    }
    try {
        if (logger.isDebugEnabled())
            log.debug("  Adding resource env ref " + resourceEnvRef.getName());
        createSubcontexts(envCtx, resourceEnvRef.getName());
        envCtx.bind(resourceEnvRef.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", e));
    }

}