private Class<?> loadTypeClass(String className, String refName) // d476227.1
    throws InjectionConfigurationException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "loadTypeClass : " + className);

        ClassLoader classLoader = ivNameSpaceConfig.getClassLoader();
        if (className == null || className.equals("") || classLoader == null)
        {
            if (isTraceOn && tc.isEntryEnabled())
                Tr.exit(tc, "loadTypeClass : null");
            return null; // d701306.1
        }

        Class<?> loadedClass;

        try
        {
            loadedClass = classLoader.loadClass(className);
        } catch (ClassNotFoundException ex)
        {
            FFDCFilter.processException(ex, CLASS_NAME + ".loadTypeClass",
                                        "1142", this, new Object[] { className });

            // Older applications may have inadvertantly coded 'type' values
            // on the xml reference that are invalid.... but because they
            // were ignored, and only the bindings used, the app worked
            // anyway. To allow these older applications to continue working
            // a warning will be logged for this, rather than a failure.  d476227.1

            String module = ivNameSpaceConfig.getModuleName();
            Tr.warning(tc, "RESOURCE_TYPE_NOT_FOUND_CWNEN0046W", className, refName, module); // d479669
            if (isValidationFailable()) // F50309.6
            {
                throw new InjectionConfigurationException("CWNEN0046W: The " + className +
                                                          " type specified on the resource-ref, resource-env-ref, or" +
                                                          " message-destination-ref with the " + refName +
                                                          " name in the " + module +
                                                          " module could not be loaded.");
            }

            loadedClass = null; // d701306.1
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "loadTypeClass : " + loadedClass);

        return loadedClass;
    }
private Class < ? > loadTypeClass ( String className , String refName ) throws InjectionConfigurationException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "loadTypeClass : " + className ) ; ClassLoader classLoader = ivNameSpaceConfig . getClassLoader ( ) ; if ( className == null || className . equals ( "" ) || classLoader == null ) { if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "loadTypeClass : null" ) ; return null ; } Class < ? > loadedClass ; try { loadedClass = classLoader . loadClass ( className ) ; } catch ( ClassNotFoundException ex ) { FFDCFilter . processException ( ex , CLASS_NAME + ".loadTypeClass" , "1142" , this , new Object [ ] { className } ) ; String module = ivNameSpaceConfig . getModuleName ( ) ; Tr . warning ( tc , "RESOURCE_TYPE_NOT_FOUND_CWNEN0046W" , className , refName , module ) ; if ( isValidationFailable ( ) ) { throw new InjectionConfigurationException ( "CWNEN0046W: The " + className + " type specified on the resource-ref, resource-env-ref, or" + " message-destination-ref with the " + refName + " name in the " + module + " module could not be loaded." ) ; } loadedClass = null ; } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "loadTypeClass : " + loadedClass ) ; return loadedClass ; }
Internal method to isolate the class loading logic. <p>

Returns the loaded type class using the component specific ClassLoader,
or null if the specified class name was null or the empty string, if the
class loader was null, or if the class fails to load. <p>

@param className name of the class to load
@param refName name of the resource reference this class is
associated with, for ras.