code: public void destroy() {
          DeferredBindingActions.clear();
          if(!disconnected.isEmpty()) {
              disconnected.pop();
          }
          if (getSessionFactory() == null || decNestingCount() > 0 || getParticipate()) {
              return;
          }
  
          // single session mode
          SessionHolder holder = (SessionHolder) TransactionSynchronizationManager.unbindResource(getSessionFactory());
          LOG.debug("Closing single Hibernate session in GrailsDispatcherServlet");
          try {
              disconnected.clear();
              SessionFactoryUtils.closeSession(holder.getSession());
          }
          catch (RuntimeException ex) {
              LOG.error("Unexpected exception on closing Hibernate Session", ex);
          }
      }
docs: /* (non-Javadoc)
  @see org.codehaus.groovy.grails.support.PersistenceContextInterceptor#destroy()