public String getName() { return decoree.getName(); }
public String getName() { return decoree.getName(); }
public int hashCode() { int result = NULL_HASH_CODE; String name = getName(); if (name != null) { result += name.hashCode(); } return result; }
@Override public boolean equals(Object object) { if (object instanceof EjbReference) { EjbReference ejbReference = (EjbReference) object; return ejbReference.getName().equals(this.getName()); } return false; }
public boolean equals(Object object) { if (object instanceof EjbReference) { EjbReference ejbReference = (EjbReference) object; return ejbReference.getName().equals(this.getName()); } return false; }
/** * Looks up an ejb reference with the given name. Throws an IllegalArgumentException * if it is not found. */ public EjbReferenceDescriptor getEjbReferenceByName(String name) { for (Iterator itr = this.getEjbReferenceDescriptors().iterator(); itr.hasNext();) { EjbReferenceDescriptor ejr = (EjbReferenceDescriptor) itr.next(); if (ejr.getName().equals(name)) { return ejr; } } throw new IllegalArgumentException(localStrings.getLocalString( "exceptionappclienthasnoejbrefbyname", "This application client [{0}] has no ejb reference by the name of [{1}]", new Object[] {getName(), name})); }
/** * Looks up an ejb reference with the given name. Throws an IllegalArgumentException * if it is not found. */ public EjbReferenceDescriptor getEjbReferenceByName(String name) { for (Iterator itr = this.getEjbReferenceDescriptors().iterator(); itr.hasNext();) { EjbReferenceDescriptor ejr = (EjbReferenceDescriptor) itr.next(); if (ejr.getName().equals(name)) { return ejr; } } throw new IllegalArgumentException(localStrings.getLocalString( "exceptionappclienthasnoejbrefbyname", "This application client [{0}] has no ejb reference by the name of [{1}]", new Object[] {getName(), name})); }
/** returns a formatted string representing me. */ public void print(StringBuffer toStringBuffer) { String localVsRemote = isLocal() ? "Local" : "Remote"; toStringBuffer.append(localVsRemote + " ejb-ref "); toStringBuffer.append("name="+getName()); if( isEJB30ClientView() ) { toStringBuffer.append("," + localVsRemote + " 3.x interface ="+getEjbInterface()); } else { toStringBuffer.append("," + localVsRemote + " 2.x home ="+getEjbHomeInterface()); toStringBuffer.append("," + localVsRemote + " 2.x component interface="+getEjbInterface()); } if( ejbDescriptor != null ) { toStringBuffer.append(" resolved to intra-app EJB "+ejbDescriptor.getName() + " in module " + ejbDescriptor.getEjbBundleDescriptor().getModuleName()); } toStringBuffer.append(",ejb-link="+getLinkName()); toStringBuffer.append(",lookup="+getLookupName()); toStringBuffer.append(",mappedName="+getMappedName()); toStringBuffer.append(",jndi-name=" + getValue()); toStringBuffer.append(",refType="+getType()); }
/** returns a formatted string representing me. */ @Override public void print(StringBuffer toStringBuffer) { String localVsRemote = isLocal() ? "Local" : "Remote"; toStringBuffer.append(localVsRemote + " ejb-ref "); toStringBuffer.append("name="+getName()); if( isEJB30ClientView() ) { toStringBuffer.append("," + localVsRemote + " 3.x interface ="+getEjbInterface()); } else { toStringBuffer.append("," + localVsRemote + " 2.x home ="+getEjbHomeInterface()); toStringBuffer.append("," + localVsRemote + " 2.x component interface="+getEjbInterface()); } if( ejbDescriptor != null ) { toStringBuffer.append(" resolved to intra-app EJB "+ejbDescriptor.getName() + " in module " + ejbDescriptor.getEjbBundleDescriptor().getModuleName()); } toStringBuffer.append(",ejb-link="+getLinkName()); toStringBuffer.append(",lookup="+getLookupName()); toStringBuffer.append(",mappedName="+getMappedName()); toStringBuffer.append(",jndi-name=" + getValue()); toStringBuffer.append(",refType="+getType()); }
public Object create(Context ctx) throws NamingException { Object result = null; if (ejbRefMgr == null) { synchronized (this) { if (ejbRefMgr == null) { ejbRefMgr = habitat.getByContract(EjbNamingReferenceManager.class); cacheable = new Boolean(ejbRefMgr.isEjbReferenceCacheable(ejbRef)); } } } if (ejbRefMgr != null) { if ((cacheable != null) && (cacheable.booleanValue() == true)) { if (cachedResult != null) { result = cachedResult; } else { result = cachedResult = ejbRefMgr.resolveEjbReference(ejbRef, ctx); } } else { result = ejbRefMgr.resolveEjbReference(ejbRef, ctx); } } if( result == null ) { throw new NameNotFoundException("Can not resolve ejb reference " + ejbRef.getName() + " : " + ejbRef); } return result; } }
boolean isConflict(EjbReferenceDescriptor other) { return (getName().equals(other.getName())) && (!( DOLUtils.equals(getType(), other.getType()) && DOLUtils.equals(getEjbHomeInterface(), other.getEjbHomeInterface()) && DOLUtils.equals(getEjbInterface(), other.getEjbInterface()) && DOLUtils.equals(getLinkName(), other.getLinkName()) ) || isConflictResourceGroup(other)); } }
public Object create(Context ctx) throws NamingException { Object result = null; if (ejbRefMgr == null) { synchronized (this) { if (ejbRefMgr == null) { ejbRefMgr = locator.getService(EjbNamingReferenceManager.class); cacheable = ejbRefMgr.isEjbReferenceCacheable(ejbRef); } } } if (ejbRefMgr != null) { if ((cacheable != null) && (cacheable.booleanValue() == true)) { if (cachedResult != null) { result = cachedResult; } else { result = cachedResult = ejbRefMgr.resolveEjbReference(ejbRef, ctx); } } else { result = ejbRefMgr.resolveEjbReference(ejbRef, ctx); } } if( result == null ) { throw new NameNotFoundException("Can not resolve ejb reference " + ejbRef.getName() + " : " + ejbRef); } return result; } }
public boolean isConflict(EjbReferenceDescriptor other) { return (getName().equals(other.getName())) && (!( DOLUtils.equals(getType(), other.getType()) && DOLUtils.equals(getEjbHomeInterface(), other.getEjbHomeInterface()) && DOLUtils.equals(getEjbInterface(), other.getEjbInterface()) && DOLUtils.equals(getLinkName(), other.getLinkName()) ) || isConflictResourceGroup(other)); } }
String name = getLogicalJNDIName(ejbRef.getName(), env);
ejbRef.addInjectionTarget(target); if (!ok(ejbRef.getName())) // a new one ejbRef.setName(logicalName);
ejbRef.addInjectionTarget(target); if (!ok(ejbRef.getName())) // a new one ejbRef.setName(logicalName);