protected void loadOptionalExecutor ( final String executorBinder ) { try { final Method bindExecutor = RepositoryModule . class . getDeclaredMethod ( "bindExecutor" , Class . class ) ; bindExecutor . setAccessible ( true ) ; try { Class . forName ( executorBinder ) . getConstructor ( RepositoryModule . class , Method . class ) . newInstance ( this , bindExecutor ) ; } finally { bindExecutor . setAccessible ( false ) ; } } catch ( Exception ignore ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Failed to process executor loader " + executorBinder , ignore ) ; } } }
Allows to load executor only if required jars are in classpath . For example no need for graph dependencies if only object db is used .