public int hashCode() { int result = NULL_HASH_CODE; String name = getName(); if (name != null) { result += name.hashCode(); } return result; }
public void accept(ServiceReferenceDescriptor serviceRef) { DOLUtils.getDefaultLogger().info(serviceRef.getName()); }
protected ServiceReferenceDescriptor _getServiceReferenceByName(String name) { for (ServiceReferenceDescriptor srd : getServiceReferenceDescriptors()) { if (srd.getName().equals(name)) { return srd; } } return null; }
/** * Looks up an service reference with the given name. * Throws an IllegalArgumentException if it is not found. */ public ServiceReferenceDescriptor getServiceReferenceByName(String name) { for (Iterator itr = this.getServiceReferenceDescriptors().iterator(); itr.hasNext();) { ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) itr.next(); if (srd.getName().equals(name)) { return srd; } } throw new IllegalArgumentException("No service ref of name " + name); }
@Override protected void accept(ServiceReferenceDescriptor serviceRef) { DOLUtils.getDefaultLogger().info(serviceRef.getName()); }
public ServiceReferenceDescriptor getServiceReferenceByName(String name) { for (Iterator itr = this.getServiceReferenceDescriptors().iterator(); itr.hasNext();) { ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) itr.next(); if (srd.getName().equals(name)) { return srd; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionhasnoservicerefbyname", "This class has no service reference by the name of {0}", new Object[] {name})); }
/** * Looks up an service reference with the given name. * Throws an IllegalArgumentException if it is not found. */ @Override public ServiceReferenceDescriptor getServiceReferenceByName(String name) { for (Iterator itr = getServiceReferenceDescriptors().iterator(); itr.hasNext();) { ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) itr.next(); if (srd.getName().equals(name)) { return srd; } } throw new IllegalArgumentException("No service ref of name " + name); }
public ServiceReferenceDescriptor getServiceReferenceByName(String name) { for (Iterator itr = this.getServiceReferenceDescriptors().iterator(); itr.hasNext();) { ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) itr.next(); if (srd.getName().equals(name)) { return srd; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionhasnoservicerefbyname", "This class has no service reference by the name of {0}", new Object[] {name})); }
/** * Looks up an service reference with the given name. * Throws an IllegalArgumentException if it is not found. */ public ServiceReferenceDescriptor getServiceReferenceByName(String name) { for (Iterator itr = this.getServiceReferenceDescriptors().iterator(); itr.hasNext();) { ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) itr.next(); if (srd.getName().equals(name)) { return srd; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionapphasnoservicerefbyname", "This app [{0}] has no service reference by the name of [{1}]", new Object[]{getRegistrationName(), name})); }
/** * Looks up an service reference with the given name. * Throws an IllegalArgumentException if it is not found. */ public ServiceReferenceDescriptor getServiceReferenceByName(String name) { for (Iterator itr = this.getServiceReferenceDescriptors().iterator(); itr.hasNext();) { ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) itr.next(); if (srd.getName().equals(name)) { return srd; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionapphasnoservicerefbyname", "This app [{0}] has no service reference by the name of [{1}]", new Object[]{getRegistrationName(), name})); }
/** * Looks up an service reference with the given name. * Throws an IllegalArgumentException if it is not found. */ @Override public ServiceReferenceDescriptor getServiceReferenceByName(String name) { if (env != null) return env.getServiceReferenceByName(name); for (Iterator itr = this.getServiceReferenceDescriptors().iterator(); itr.hasNext();) { ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) itr.next(); if (srd.getName().equals(name)) { return srd; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionejbhasnoservicerefbyname", "This ejb [{0}] has no service reference by the name of [{1}]", new Object[]{getName(), name})); }
/** * Looks up an service reference with the given name. * Throws an IllegalArgumentException if it is not found. */ @Override public final ServiceReferenceDescriptor getServiceReferenceByName(String name) { if (env != null) return env.getServiceReferenceByName(name); for (Iterator itr = this.getServiceReferenceDescriptors().iterator(); itr.hasNext();) { ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) itr.next(); if (srd.getName().equals(name)) { return srd; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionejbhasnoservicerefbyname", "This ejb [{0}] has no service reference by the name of [{1}]", new Object[]{getName(), name})); }
boolean isConflict(ServiceReferenceDescriptor other) { return (getName().equals(other.getName())) && (!( DOLUtils.equals(getServiceInterface(), other.getServiceInterface()) && DOLUtils.equals(getWsdlFileUri(), other.getWsdlFileUri()) && DOLUtils.equals(getMappingFileUri(), other.getMappingFileUri()) //XXX need to compare the following // handler // handle-chains // port-component-info ) || isConflictResourceGroup(other)); } }
public final void addServiceReferenceDescriptor( ServiceReferenceDescriptor serviceRef) { try { ServiceReferenceDescriptor existing = this.getServiceReferenceByName(serviceRef.getName()); for(InjectionTarget next : serviceRef.getInjectionTargets()) { existing.addInjectionTarget(next); } } catch(IllegalArgumentException e) { if (env != null) env.addServiceReferenceDescriptor(serviceRef); else serviceReferences.add(serviceRef); serviceRef.setBundleDescriptor(getEjbBundleDescriptor()); } }
public boolean isConflict(ServiceReferenceDescriptor other) { return (getName().equals(other.getName())) && (!( DOLUtils.equals(getServiceInterface(), other.getServiceInterface()) && DOLUtils.equals(getWsdlFileUri(), other.getWsdlFileUri()) && DOLUtils.equals(getMappingFileUri(), other.getMappingFileUri()) //XXX need to compare the following // handler // handle-chains // port-component-info ) || isConflictResourceGroup(other)); } }
public void addServiceReferenceDescriptor( ServiceReferenceDescriptor serviceRef) { try { ServiceReferenceDescriptor existing = this.getServiceReferenceByName(serviceRef.getName()); for(InjectionTarget next : serviceRef.getInjectionTargets()) { existing.addInjectionTarget(next); } } catch(IllegalArgumentException e) { if (env != null) env.addServiceReferenceDescriptor(serviceRef); else serviceReferences.add(serviceRef); serviceRef.setBundleDescriptor(getEjbBundleDescriptor()); } }
private void parseResources(ServiceReferenceDescriptor serviceRef, JndiNameEnvironment env, AppResources appResources) { String name = getLogicalJNDIName(serviceRef.getName(), env); if (serviceRef.hasLookupName()) appResources.store(new AppResource(name, serviceRef.getLookupName(), serviceRef.getType(), env, true)); else appResources.storeInNamespace(name, env); }
@Override protected void combineServiceReferenceDescriptors(JndiNameEnvironment env) { for (Object oserviceRef : env.getServiceReferenceDescriptors()) { ServiceReferenceDescriptor serviceRef = (ServiceReferenceDescriptor)oserviceRef; ServiceReferenceDescriptor sr = _getServiceReferenceByName(serviceRef.getName()); if (sr != null) { if (sr.isConflict((ServiceReferenceDescriptor)serviceRef)) { conflictServiceReference = true; } unionInjectionTargets(sr, serviceRef); } else { addServiceReferenceDescriptor(serviceRef); } } }