private void setXMLType ( String typeName , String element , String nameElement , String typeElement ) // F743-32443 throws InjectionConfigurationException { if ( ivNameSpaceConfig . getClassLoader ( ) == null ) { setInjectionClassTypeName ( typeName ) ; } else { Class < ? > type = loadClass ( typeName ) ; //The type parameter is "optional" if ( type != null ) { ResourceImpl curAnnotation = ( ResourceImpl ) getAnnotation ( ) ; if ( curAnnotation . ivIsSetType ) { Class < ? > curType = getInjectionClassType ( ) ; // check that value from xml is a subclasss, if not throw an error Class < ? > mostSpecificClass = mostSpecificClass ( type , curType ) ; if ( mostSpecificClass == null ) { Tr . error ( tc , "CONFLICTING_XML_VALUES_CWNEN0052E" , ivComponent , ivModule , ivApplication , typeElement , element , nameElement , getJndiName ( ) , curType , type ) ; // d479669 String exMsg = "The " + ivComponent + " bean in the " + ivModule + " module of the " + ivApplication + " application has conflicting configuration data in the XML" + " deployment descriptor. Conflicting " + typeElement + " element values exist for multiple " + element + " elements with the same " + nameElement + " element value : " + getJndiName ( ) + ". The conflicting " + typeElement + " element values are " + curType + " and " + type + "." ; // d479669 throw new InjectionConfigurationException ( exMsg ) ; } curAnnotation . ivType = mostSpecificClass ; } else { curAnnotation . ivType = type ; curAnnotation . ivIsSetType = true ; } } } }
Sets the injection type as specified in XML .