Java 类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(), ejb.getHome(), ejb.getRemote(), ejb.getLink());
    // Adding the additional parameters, 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, paramValue);
        ref.add(refAddr);
    }
    try {
        createSubcontexts(envCtx, ejb.getName());
        envCtx.bind(ejb.getName(), ref);
    } catch (NamingException e) {
        logger.error(sm.getString("naming.bindFailed", 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(), ejb.getHome(), ejb.getRemote(), ejb.getLink());
    // Adding the additional parameters, if any
    addAdditionalParameters(ejb.getNamingResources(), ref, ejb.getName());
    try {
        createSubcontexts(envCtx, ejb.getName());
        envCtx.bind(ejb.getName(), 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(), 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));
    }

}
项目: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(), 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));
    }

}
项目: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(), 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));
    }

}
项目: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(), 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));
    }

}
项目: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(), 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));
    }

}
项目: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(), ejb.getHome(), ejb.getRemote(), ejb.getLink());
    // Adding the additional parameters, if any
    addAdditionalParameters(ejb.getNamingResources(), ref, ejb.getName());
    try {
        createSubcontexts(envCtx, ejb.getName());
        envCtx.bind(ejb.getName(), ref);
    } catch (NamingException e) {
        log(sm.getString("naming.bindFailed", 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(), 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));
    }

}
项目: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    文件: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],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;
}
项目: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, if any;
 * otherwise, 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, if any;
 * otherwise, 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, if any;
 * otherwise, 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();

}