/** * Add an EJB resource reference for this web application. * * @param ejb New EJB resource reference */ public void addEjb(ContextEjb ejb) { // Entries with lookup-name and ejb-link are an error (EE.5.5.2 / EE.5.5.3) String ejbLink = ejb.getLink(); String lookupName = ejb.getLookupName(); if (ejbLink != null && ejbLink.length() > 0 && lookupName != null && lookupName.length() > 0) { throw new IllegalArgumentException( sm.getString("namingResources.ejbLookupLink", ejb.getName())); } if (entries.contains(ejb.getName())) { return; } else { entries.add(ejb.getName()); } synchronized (ejbs) { ejb.setNamingResources(this); ejbs.put(ejb.getName(), ejb); } support.firePropertyChange("ejb", null, ejb); }
/** * Add an EJB resource reference for this web application. * * @param ejb New EJB resource reference */ public void addEjb(ContextEjb ejb) { // Entries with lookup-name and ejb-link are an error (EE.5.5.2 / EE.5.5.3) String ejbLink = ejb.getLink(); String lookupName = ejb.getLookupName(); if (ejbLink != null && ejbLink.length() > 0 && lookupName != null && lookupName.length() > 0) { throw new IllegalArgumentException( sm.getString("namingResources.ejbLookupLink", ejb.getName())); } if (entries.contains(ejb.getName())) { return; } else { entries.add(ejb.getName()); } synchronized (ejbs) { ejb.setNamingResources(this); ejbs.put(ejb.getName(), ejb); } support.firePropertyChange("ejb", null, ejb); }
sb.append(" </injection-target>\n"); appendElement(sb, INDENT4, "lookup-name", ejbRef.getLookupName()); sb.append(" </ejb-ref>\n");
sb.append(" </injection-target>\n"); appendElement(sb, INDENT4, "lookup-name", ejbRef.getLookupName()); sb.append(" </ejb-ref>\n");