This is important for freeing network resources on heavily laden web-app servers as well as the LDAP servers they point at. I had to add <% contextName.close(); %> to the end of my jsp page in order to do a timely close of the connection to an LDAP resource. In my Java code that uses JNDI and LDAP, I just use contextName.close() in the finally clause so as not to forget :-)
Additionally, if this is to remain flexible, perhaps for JNDI connection pooling, then why not just offer a : <jndi:closeContext id="contextName" /> tag similar to what is used in Taglibs dbtags with <sql:closeConnection conn="connname"/> ?
*** Bug 23364 has been marked as a duplicate of this bug. ***
Resolving as the JNDI taglib has been retired.