微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

org.apache.catalina.deploy.ContextEjb的实例源码

项目:tomcat7    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef
        (ejb.getType(),ejb.getHome(),ejb.getRemote(),ejb.getLink());
    // Adding the additional parameters,if any
    Iterator<String> params = ejb.listProperties();
    while (params.hasNext()) {
        String paramName = params.next();
        String paramValue = (String) ejb.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName,paramValue);
        ref.add(refAddr);
    }
    try {
        createSubcontexts(envCtx,ejb.getName());
        envCtx.bind(ejb.getName(),ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed",e));
    }

}
项目:lams    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef
        (ejb.getType(),if any
    Iterator params = ejb.listProperties();
    while (params.hasNext()) {
        String paramName = (String) params.next();
        String paramValue = (String) ejb.getProperty(paramName);
        StringRefAddr refAddr = new StringRefAddr(paramName,e));
    }

}
项目:jerrydog    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef
        (ejb.getType(),if any
    addAdditionalParameters(ejb.getNamingResources(),ref,ejb.getName());
    try {
        createSubcontexts(envCtx,ref);
    } catch (NamingException e) {
        log(sm.getString("naming.bindFailed",e));
    }

}
项目:apache-tomcat-7.0.73-with-comment    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef
        (ejb.getType(),e));
    }

}
项目:lazycat    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef(ejb.getType(),e));
    }

}
项目:class-guard    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef
        (ejb.getType(),e));
    }

}
项目:apache-tomcat-7.0.57    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef
        (ejb.getType(),e));
    }

}
项目:HowTomcatWorks    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef
        (ejb.getType(),e));
    }

}
项目:WBSAirback    文件NamingContextListener.java   
/**
 * Set the specified EJBs in the naming context.
 */
public void addEjb(ContextEjb ejb) {

    // Create a reference to the EJB.
    Reference ref = new EjbRef
        (ejb.getType(),e));
    }

}
项目:jerrydog    文件StandardDefaultContext.java   
/**
 * Import the configuration from the DefaultContext into
 * current Context.
 *
 * @param context current web application context
 */
public void importDefaultContext(Context context) {

    if (context instanceof StandardContext) {
        ((StandardContext)context).setUseNaming(isUseNaming());
        ((StandardContext)context).setSwallowOutput(getSwallowOutput());
        if (!contexts.containsKey(context)) {
            ((StandardContext) context).addLifecycleListener(this);
        }
    }

    context.setCookies(getCookies());
    context.setCrossContext(getCrossContext());
    context.setReloadable(getReloadable());

    String [] listeners = findApplicationListeners();
    for( int i = 0; i < listeners.length; i++ ) {
        context.addApplicationListener(listeners[i]);
    }
    listeners = findInstanceListeners();
    for( int i = 0; i < listeners.length; i++ ) {
        context.addInstanceListener(listeners[i]);
    }
    String [] wrapper = findWrapperListeners();
    for( int i = 0; i < wrapper.length; i++ ) {
        context.addWrapperListener(wrapper[i]);
    }
    wrapper = findWrapperLifecycles();
    for( int i = 0; i < wrapper.length; i++ ) {
        context.addWrapperLifecycle(wrapper[i]);
    }
    String [] parameters = findParameters();
    for( int i = 0; i < parameters.length; i++ ) {
        context.addParameter(parameters[i],findParameter(parameters[i]));
    }
    ApplicationParameter [] appParam = findApplicationParameters();
    for( int i = 0; i < appParam.length; i++ ) {
        context.addApplicationParameter(appParam[i]);
    }

    if (!(context instanceof StandardContext)) {
        ContextEjb [] contextEjb = findEjbs();
        for( int i = 0; i < contextEjb.length; i++ ) {
            context.addEjb(contextEjb[i]);
        }
        ContextEnvironment [] contextEnv = findEnvironments();
        for( int i = 0; i < contextEnv.length; i++ ) {
            context.addEnvironment(contextEnv[i]);
        }
        /*
        if (context instanceof StandardContext) {
            ResourceParams [] resourceParams = findResourceParams();
            for( int i = 0; i < resourceParams.length; i++ ) {
                ((StandardContext)context).addResourceParams
                    (resourceParams[i]);
            }
        }
        */
        ContextResource [] resources = findResources();
        for( int i = 0; i < resources.length; i++ ) {
            context.addResource(resources[i]);
        }
        String [] envRefs = findResourceEnvRefs();
        for( int i = 0; i < envRefs.length; i++ ) {
            context.addResourceEnvRef
                (envRefs[i],findResourceEnvRef(envRefs[i]));
        }
    }

}
项目:HowTomcatWorks    文件SimpleContext.java   
public void addEjb(ContextEjb ejb) {
}
项目:HowTomcatWorks    文件SimpleContext.java   
public ContextEjb findEjb(String name) {
  return null;
}
项目:HowTomcatWorks    文件SimpleContext.java   
public ContextEjb[] findEjbs() {
  return null;
}
项目:HowTomcatWorks    文件StandardDefaultContext.java   
/**
 * Import the configuration from the DefaultContext into
 * current Context.
 *
 * @param context current web application context
 */
public void importDefaultContext(Context context) {

    if (context instanceof StandardContext) {
        ((StandardContext)context).setUseNaming(isUseNaming());
        ((StandardContext)context).setSwallowOutput(getSwallowOutput());
        if (!contexts.containsKey(context)) {
            ((StandardContext) context).addLifecycleListener(this);
        }
    }

    context.setCookies(getCookies());
    context.setCrossContext(getCrossContext());
    context.setReloadable(getReloadable());

    String [] listeners = findApplicationListeners();
    for( int i = 0; i < listeners.length; i++ ) {
        context.addApplicationListener(listeners[i]);
    }
    listeners = findInstanceListeners();
    for( int i = 0; i < listeners.length; i++ ) {
        context.addInstanceListener(listeners[i]);
    }
    String [] wrapper = findWrapperListeners();
    for( int i = 0; i < wrapper.length; i++ ) {
        context.addWrapperListener(wrapper[i]);
    }
    wrapper = findWrapperLifecycles();
    for( int i = 0; i < wrapper.length; i++ ) {
        context.addWrapperLifecycle(wrapper[i]);
    }
    String [] parameters = findParameters();
    for( int i = 0; i < parameters.length; i++ ) {
        context.addParameter(parameters[i],findResourceEnvRef(envRefs[i]));
        }
    }

}
项目:jerrydog    文件StandardContext.java   
/**
 * Add an EJB resource reference for this web application.
 *
 * @param ejb New EJB resource reference
 */
public void addEjb(ContextEjb ejb) {

    namingResources.addEjb(ejb);
    fireContainerEvent("addEjb",ejb.getName());

}
项目:HowTomcatWorks    文件StandardContext.java   
/**
 * Add an EJB resource reference for this web application.
 *
 * @param ejb New EJB resource reference
 */
public void addEjb(ContextEjb ejb) {

    namingResources.addEjb(ejb);
    fireContainerEvent("addEjb",ejb.getName());

}
项目:jerrydog    文件Context.java   
/**
 * Add an EJB resource reference for this web application.
 *
 * @param ejb New EJB resource reference
 */
public void addEjb(ContextEjb ejb);
项目:jerrydog    文件Context.java   
/**
 * Return the EJB resource reference with the specified name,if any;
 * otherwise,return <code>null</code>.
 *
 * @param name Name of the desired EJB resource reference
 */
public ContextEjb findEjb(String name);
项目:jerrydog    文件Context.java   
/**
 * Return the defined EJB resource references for this application.
 * If there are none,a zero-length array is returned.
 */
public ContextEjb[] findEjbs();
项目:jerrydog    文件DefaultContext.java   
/**
 * Add an EJB resource reference for this web application.
 *
 * @param ejb New EJB resource reference
 */
public void addEjb(ContextEjb ejb);
项目:jerrydog    文件DefaultContext.java   
/**
 * Return the EJB resource reference with the specified name,return <code>null</code>.
 *
 * @param name Name of the desired EJB resource reference
 */
public ContextEjb findEjb(String name);
项目:jerrydog    文件DefaultContext.java   
/**
 * Return the defined EJB resource references for this application.
 * If there are none,a zero-length array is returned.
 */
public ContextEjb[] findEjbs();
项目:jerrydog    文件StandardDefaultContext.java   
/**
 * Add an EJB resource reference for this web application.
 *
 * @param ejb New EJB resource reference
 */
public void addEjb(ContextEjb ejb) {

    namingResources.addEjb(ejb);

}
项目:jerrydog    文件StandardDefaultContext.java   
/**
 * Return the defined EJB resource references for this application.
 * If there are none,a zero-length array is returned.
 */
public ContextEjb[] findEjbs() {

    return namingResources.findEjbs();

}
项目:jerrydog    文件StandardContext.java   
/**
 * Return the defined EJB resource references for this application.
 * If there are none,a zero-length array is returned.
 */
public ContextEjb[] findEjbs() {

    return namingResources.findEjbs();

}
项目:HowTomcatWorks    文件Context.java   
/**
 * Add an EJB resource reference for this web application.
 *
 * @param ejb New EJB resource reference
 */
public void addEjb(ContextEjb ejb);
项目:HowTomcatWorks    文件Context.java   
/**
 * Return the EJB resource reference with the specified name,return <code>null</code>.
 *
 * @param name Name of the desired EJB resource reference
 */
public ContextEjb findEjb(String name);
项目:HowTomcatWorks    文件Context.java   
/**
 * Return the defined EJB resource references for this application.
 * If there are none,a zero-length array is returned.
 */
public ContextEjb[] findEjbs();
项目:HowTomcatWorks    文件DefaultContext.java   
/**
 * Add an EJB resource reference for this web application.
 *
 * @param ejb New EJB resource reference
 */
public void addEjb(ContextEjb ejb);
项目:HowTomcatWorks    文件DefaultContext.java   
/**
 * Return the EJB resource reference with the specified name,return <code>null</code>.
 *
 * @param name Name of the desired EJB resource reference
 */
public ContextEjb findEjb(String name);
项目:HowTomcatWorks    文件DefaultContext.java   
/**
 * Return the defined EJB resource references for this application.
 * If there are none,a zero-length array is returned.
 */
public ContextEjb[] findEjbs();
项目:HowTomcatWorks    文件StandardDefaultContext.java   
/**
 * Add an EJB resource reference for this web application.
 *
 * @param ejb New EJB resource reference
 */
public void addEjb(ContextEjb ejb) {

    namingResources.addEjb(ejb);

}
项目:HowTomcatWorks    文件StandardDefaultContext.java   
/**
 * Return the defined EJB resource references for this application.
 * If there are none,a zero-length array is returned.
 */
public ContextEjb[] findEjbs() {

    return namingResources.findEjbs();

}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。