public static Connection createConnection ( final ConnectionFactory connectionFactory ) throws LdapException { val c = connectionFactory . getConnection ( ) ; if ( ! c . isOpen ( ) ) { c . open ( ) ; } return c ; }
Gets connection from the factory . Opens the connection if needed .