public Object execute(JndiCallback contextCallback) throws NamingException {
        Context ctx = createInitialContext();
        try {
            return contextCallback.doInContext(ctx);
        } finally {
            try {
                ctx.close();
            } catch (NamingException ex) {
                LOGGER.debug("Could not close JNDI InitialContext", ex);
            }
        }
    }
Execute the given JNDI context callback implementation.

@param contextCallback JndiCallback implementation
@return a result object returned by the callback, or <code>null</code>
@throws NamingException thrown by the callback implementation
@see #createInitialContext
core/src/main/java/org/apache/shiro/jndi/JndiTemplate.java