/** * Return whether the application contains the given ejb by name.. * * @param ejbName the name of the bean * @return true if there is a bean matching the given name */ public boolean hasEjbByName(String ejbName) { for (EjbBundleDescriptor ebd : getBundleDescriptors(EjbBundleDescriptor.class)) { if (ebd.hasEjbByName(ejbName)) { return true; } } return false; }
/** * Return whether the application contains the given ejb by name.. * * @param ejbName the name of the bean * @return true if there is a bean matching the given name */ public boolean hasEjbByName(String ejbName) { for (EjbBundleDescriptor ebd : getBundleDescriptors(EjbBundleDescriptor.class)) { if (ebd.hasEjbByName(ejbName)) { return true; } } return false; }
/** * Obtain the EJB in this application of the given display name. If the EJB is not * present, throw an IllegalArgumentException. * * @param ejbName the name of the bean * @return the EjbDescriptor object with the given display name */ public EjbDescriptor getEjbByName(String ejbName) { for (EjbBundleDescriptor ejbd : getBundleDescriptors(EjbBundleDescriptor.class)) { if (ejbd.hasEjbByName(ejbName)) { return ejbd.getEjbByName(ejbName); } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionapphasnobeannamed", "This application has no beans of name {0}", ejbName)); }
/** * Obtain the EJB in this application of the given display name. If the EJB is not * present, throw an IllegalArgumentException. * * @param ejbName the name of the bean * @return the EjbDescriptor object with the given display name */ public EjbDescriptor getEjbByName(String ejbName) { for (EjbBundleDescriptor ejbd : getEjbBundleDescriptors()) { if (ejbd.hasEjbByName(ejbName)) { return ejbd.getEjbByName(ejbName); } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionapphasnobeannamed", "This application has no beans of name {0}", ejbName)); }
: (EjbBundleDescriptor) bundle; if( !ejbBundle.hasEjbByName(ejbName) ) { throw new RuntimeException("Invalid DependsOn dependency '" + next + "' for EJB " + ejb.getName()); if( !bundle.hasEjbByName(next) ) { throw new RuntimeException("Invalid DependsOn dependency '" + next + "' for EJB " + ejb.getName());
/** * Convert the contents of the ejb-link or servlet-link element to * an object representing the implementation component. */ public boolean resolveComponentLink() { boolean resolved = false; if( ejbLink != null ) { EjbBundleDescriptor ejbBundle = getEjbBundle(); if( ejbBundle.hasEjbByName(ejbLink) ) { resolved = true; EjbDescriptor ejb = ejbBundle.getEjbByName(ejbLink); setEjbComponentImpl(ejb); } } else if( webComponentLink != null ) { WebBundleDescriptor webBundle = getWebBundle(); WebComponentDescriptor webComponent = (WebComponentDescriptor) webBundle. getWebComponentByCanonicalName(webComponentLink); if( webComponent != null ) { resolved = true; setWebComponentImpl(webComponent); } } return resolved; }
/** * Convert the contents of the ejb-link or servlet-link element to * an object representing the implementation component. */ public boolean resolveComponentLink() { boolean resolved = false; if( ejbLink != null ) { EjbBundleDescriptor ejbBundle = getEjbBundle(); if( ejbBundle.hasEjbByName(ejbLink) ) { resolved = true; EjbDescriptor ejb = ejbBundle.getEjbByName(ejbLink); setEjbComponentImpl(ejb); } } else if( webComponentLink != null ) { WebBundleDescriptor webBundle = getWebBundle(); WebComponentDescriptor webComponent = (WebComponentDescriptor) webBundle. getWebComponentByCanonicalName(webComponentLink); if( webComponent != null ) { resolved = true; setWebComponentImpl(webComponent); } } return resolved; }
&& ejbBundleDescriptor.hasEjbByName(linkName) ) {
if (app != null && ebd != null && ebd.hasEjbByName(linkName)) { ejbReferee = ebd.getEjbByName(linkName); } else if (app != null && app.hasEjbByName(linkName)) {