private Provider doLoadProvider ( ) { return AccessController . doPrivileged ( new PrivilegedAction < Provider > ( ) { public Provider run ( ) { // if (debug != null) { // debug.println("Loading provider: " + ProviderConfig.this); // } try { // First try with the boot classloader. return initProvider ( className , Object . class . getClassLoader ( ) ) ; } catch ( Exception e1 ) { // If that fails, try with the system classloader. try { return initProvider ( className , ClassLoader . getSystemClassLoader ( ) ) ; } catch ( Exception e ) { Throwable t ; if ( e instanceof InvocationTargetException ) { t = ( ( InvocationTargetException ) e ) . getCause ( ) ; } else { t = e ; } // if (debug != null) { // debug.println("Error loading provider " + ProviderConfig.this); // t.printStackTrace(); // } // provider indicates fatal error, pass through exception if ( t instanceof ProviderException ) { throw ( ProviderException ) t ; } // provider indicates that loading should not be retried if ( t instanceof UnsupportedOperationException ) { disableLoad ( ) ; } return null ; } } } } ) ; }
Load and instantiate the Provider described by this class .