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